![]() | |
#11
| |||
| |||
|
|
Mark Brown wrote: Sorry, Dave, but I think I have to disagree. |
|
Mark, Say what? You disagree with my test code right in front of you? Whether you quote the numbers or prepend or append an alpha character |
#12
| |||
| |||
|
#13
| |||
| |||
|
#14
| |||
| |||
|
#15
| |||
| |||
|
|
Hmmm, should have probably tested that before expounding based on memory. I seem to recall that something expoded when this was done in the past (maybe very very distant past?) but now, on D3 7.4 at least, adding zero to a large string just does... nothing. I.e. does not convert to numeric and does not remove leading zeros. So, although it does not blow up, you do still need to use string manipulation [1,1] to remove the the leading characters. |
#16
| |||
| |||
|
#17
| |||
| |||
|
|
I am doing a compare of a attribute of a file to a table the actual IF statement is IF.IM.REC<114> = UPC THEN GOTO.NEXT.ITEM The actual values are IM.REC<114> = 72288108174 UPC = 00072288108174 the IF statement acts as though it is a MATCH Any ideas? Brain totally fried today and not thinkingclearly |
#18
| |||
| |||
|
|
... In this case I usually: loop until x[1,1] ne "0" do x = x[2,99] repeat |
#19
| |||
| |||
|
#20
| |||
| |||
|
|
On jBASE, you can force a string comparison by using the StrComp() C function, e.g. DEFC StrComp(VAR, VAR, VAR) IF StrComp( '=', IM.REC<114>, UPC) THEN . . . A bit more elegant than appending (or prepending) a string to each variable, don't you think? ;-) This method is also about 5 times faster than 'IF var1 op var2', and faster still than the 'string append' method! Dan On Tue, 03 May 2005 21:07:10 GMT, "James Stoddard" <wildcat66 (AT) hotmail (DOT) com wrote: I am doing a compare of a attribute of a file to a table the actual IF statement is IF.IM.REC<114> = UPC THEN GOTO.NEXT.ITEM The actual values are IM.REC<114> = 72288108174 UPC = 00072288108174 the IF statement acts as though it is a MATCH Any ideas? Brain totally fried today and not thinkingclearly |
![]() |
| Thread Tools | |
| Display Modes | |
| |