I tried this on a MCD spirit, D3 W2k and AP-Pro as well and got the '1' and 567 that we're all getting.
 
It's been affirmed here and other places that MV considers everything as a text variable (keep file handles and arrays out of this discussion) and its numerological properties come into play only when we expect it to behave as a number. Thus
 
X="ABCDEF123IKIJIJ" ; Y="ZZZZ456ABCDEFG"
PRINT (X[7,3])+(Y[5,3])
 
would produce the 579 as well.
 
This brings up another aspect of the text/string situation: Consider this
 
A="000000"[1,3]   ;*zeros for both lines
B="000000"[1,2]
 
PRINT (A=B)
 
and you would expect to get false as textually speaking 000 is not 00. But left alone, these 2 variables can be concluded to be numbers and thus equal even though their lengths are different.
 
my 1 cent.
 
----- Original Message -----
Sent: Sunday, February 01, 2004 11:13 PM
Subject: The result of VARIABLE[1,3] + 0

Hi All,
 
What is the correct interpratation of
 
A = '0010000'
B = A[1,3] + 0
PRINT B
 
On UV 9.6 I get 0010 contrary to my expectation of 1. What is the logical explanation of this. Does UV use '+' for string concatenation as well? Then why doesnt '123' + '456' result in '123456' (I get a runtime error)?
 
Regards,
Marco


BT Yahoo! Broadband - Free modem offer, sign up online today and save £80


_______________________________________________
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users
_______________________________________________
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users

Reply via email to