Marco:
 
I guess it all depends on "what you expect".  I'd expect the results you described, "0010" and would have done what you say you "ought" to have done to convert the string to a numeric value.
 
Bill
 
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Marco Manyevere
Sent: Tuesday, February 03, 2004 2:01 AM
To: [EMAIL PROTECTED]
Subject: VARIABLE[1,3] + 0 was an operator precedence issue

Hi All,
 
Thank you for all your responses. The line that was giving me unexpected results was something like:
 
PRINT '00100'[1,3]:'0000' + 0
 
which prints 0010 and not 10000. I over generalised the problem when I posted to the list by ommiting the :'0000'. It now turns out that this was a (visually) tricky operator precedence issue and everything else works as expected.
 
I ought to have done PRINT ('00100'[1,3]:'0000') + 0 to get 10000 as the result.
 
Regards,
Marco


Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download Messenger Now
_______________________________________________
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users

Reply via email to