OK I think I have another script compilation. Given an IP address of 192.168..1
set the itemDelimiter to “.”
repeat for each item theOctet in theIPAddress
if theOctet <0 or theOctet >255 then
return "ERROR: Each IP Address octet must be a number between 0 and
255. " & \
"(ipaddress = " & theIPAddress & ")"
end if
end repeat
Should return an error on the third pass. It does not. Even though empty is in
fact less than 0, it passes the condition! Oh but wait, it gets better.
I stepped through the code, and at first it passed, but then I put in a
statement just before the condition:
put theOctet is empty
On the third pass it put true into the message box then FAILED THE TEST!
Subsequent calls to the function continued to fail! Then I stopped stepping and
recompiled the script and saved it. IT STARTED PASSING AGAIN!!!!!
This is some crazy crap! The same code should not be behaving differently
depending on whether or not I am stepping or not.
Bob S
_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode