Loading ...
Sorry, an error occurred while loading the content.

24294Unexpected results for IfSame

Expand Messages
  • joy8388608
    Jan 16, 2014
    • 0 Attachment

      NTP 7.1


      I am getting unexpected results for IfSame by adding and removing sets of double quotes. I do not see the pattern.


      Place the following lines in a document. Blank lines are ignored. Place an X in col 1 after the data lines.


      Run the code.


      My results are shown after the code.


      Any ideas?


      Joy



      "_options1=/XD .dropbox.cache C:\Users\Fred\Desktop\Dropbox\ASSeRT Lab\ADD FILES HERE "C:\Users\Fred\Desktop\Dropbox\ASSeRT Lab\Articles (make catalog)" /LOG+:%BkUpLogLoc%\BKUPLOG_%TodayYYYYMMDD%.txt /TEE /NP"


      "_options1=/XD .dropbox.cache "C:\Users\Fred\Desktop\Dropbox\ASSeRT Lab\ADD FILES HERE" C:\Users\Fred\Desktop\Dropbox\ASSeRT Lab\Articles (make catalog) /LOG+:%BkUpLogLoc%\BKUPLOG_%TodayYYYYMMDD%.txt /TEE /NP"


      _options1=/XD ".dropbox.cache" C:\Users\Fred\Desktop\Dropbox\ASSeRT Lab\ADD FILES HERE C:\Users\Fred\Desktop\Dropbox\ASSeRT Lab\Articles (make catalog) /LOG+:%BkUpLogLoc%\BKUPLOG_%TodayYYYYMMDD%.txt /TEE /NP


      _options1=/XD ".dropbox.cache" "C:\Users\Fred\Desktop\Dropbox\ASSeRT Lab\ADD FILES HERE" C:\Users\Fred\Desktop\Dropbox\ASSeRT Lab\Articles (make catalog) /LOG+:%BkUpLogLoc%\BKUPLOG_%TodayYYYYMMDD%.txt /TEE /NP


      _options1=/XD .dropbox.cache "C:\Users\Fred\Desktop\Dropbox\ASSeRT Lab\ADD FILES HERE" "C:\Users\Fred\Desktop\Dropbox\ASSeRT Lab\Articles (make catalog)" /LOG+:%BkUpLogLoc%\BKUPLOG_%TodayYYYYMMDD%.txt /TEE /NP


      _options1=/XD .dropbox.cache "C:\Users\Fred\Desktop\Dropbox\ASSeRT Lab\ADD FILES HERE" "C:\Users\Fred\Desktop\Dropbox\ASSeRT Lab\Articles (make catalog)" /LOG+:%BkUpLogLoc%\BKUPLOG_%TodayYYYYMMDD%.txt /TEE /NP


      X


      ^!SetWordWrap OFF

      ^!Set %I%=0


      :LoopTop

      ^!Inc %I%

      ^!Set %Value%=^$Getline(^%I%)$

      ^!IfSame "^$StrCopyLeft("^%Value%";1)$" "X" END

      ^!If ^$StrSize("^$StrTrim("^%Value%")$")$=0 LoopTop

      ^!IfSame "^%Value%" "^%Value%" IFSAMEMATCH else IFSAMENOTMATCH

      :IFSAMEMATCH

      ^!Set %Res%="MATCH"

      ^!Goto C1

      :IFSAMENOTMATCH

      ^!Set %Res%="NO MATCH"

      ^!Goto C1


      :C1

      ^!Jump Text_End

      ^!InsertText ^%Res%^%TAB%^%Value%^%NL%^%NL%

      ^!Goto LoopTop


      My Results

      -----------

      MATCH _options1=/XD .dropbox.cache C:\Users\Fred\Desktop\Dropbox\ASSeRT Lab\ADD FILES HERE "C:\Users\Fred\Desktop\Dropbox\ASSeRT Lab\Articles (make catalog)" /LOG+:%BkUpLogLoc%\BKUPLOG_%TodayYYYYMMDD%.txt /TEE /NP


      MATCH _options1=/XD .dropbox.cache "C:\Users\Fred\Desktop\Dropbox\ASSeRT Lab\ADD FILES HERE" C:\Users\Fred\Desktop\Dropbox\ASSeRT Lab\Articles (make catalog) /LOG+:%BkUpLogLoc%\BKUPLOG_%TodayYYYYMMDD%.txt /TEE /NP


      MATCH _options1=/XD ".dropbox.cache" C:\Users\Fred\Desktop\Dropbox\ASSeRT Lab\ADD FILES HERE C:\Users\Fred\Desktop\Dropbox\ASSeRT Lab\Articles (make catalog) /LOG+:%BkUpLogLoc%\BKUPLOG_%TodayYYYYMMDD%.txt /TEE /NP


      NO MATCH _options1=/XD ".dropbox.cache" "C:\Users\Fred\Desktop\Dropbox\ASSeRT Lab\ADD FILES HERE" C:\Users\Fred\Desktop\Dropbox\ASSeRT Lab\Articles (make catalog) /LOG+:%BkUpLogLoc%\BKUPLOG_%TodayYYYYMMDD%.txt /TEE /NP


      NO MATCH _options1=/XD .dropbox.cache "C:\Users\Fred\Desktop\Dropbox\ASSeRT Lab\ADD FILES HERE" "C:\Users\Fred\Desktop\Dropbox\ASSeRT Lab\Articles (make catalog)" /LOG+:%BkUpLogLoc%\BKUPLOG_%TodayYYYYMMDD%.txt /TEE /NP


      NO MATCH _options1=/XD .dropbox.cache "C:\Users\Fred\Desktop\Dropbox\ASSeRT Lab\ADD FILES HERE" "C:\Users\Fred\Desktop\Dropbox\ASSeRT Lab\Articles (make catalog)" /LOG+:%BkUpLogLoc%\BKUPLOG_%TodayYYYYMMDD%.txt /TEE /NP


    • Show all 5 messages in this topic