Page 1 of 1 1
Topic Options
#48049 - 1999-08-17 08:49 AM invalid syntax 'until not exist' doesn't give parser error!
Anonymous
Unregistered


Comeing from other script languages I
tried to use the following

UNTIL not exist("file_name")

and got '0' or '1' displayed but no syntax
error as I should.

Correct synax is:
UNTIL (0 = exist("file_name")) ; not exist

this behaviour is in version 3.45 and 3.55.

Will this fixed or will a NOT operator be in the next release?

Regards

Michael Holzer
Hewlett-Packard Germany

Sample to test:

$target_file = "c:\tp\tempw.doc"
? "target_file(1):" $target_file


$loop_cnt=0
$loop_cnt_max=100


do
$loop_cnt=$loop_cnt + 1
? "target_file(2):" $target_file

until not exist($target_file)
or
$loop_cnt > $loop_cnt_max


exit


Top
#48050 - 1999-08-17 09:34 AM Re: invalid syntax 'until not exist' doesn't give parser error!
Anonymous
Unregistered


You should use the while .. loop function.

Example:
[CODE]
$target_file = "c:\tp\tempw.doc"
? "target_file(1): " $target_file

$loop_cnt=0
$loop_cnt_max=100


while (exist($target_file) or $loop_cnt > $loop_cnt_max)

$loop_cnt=$loop_cnt + 1
? "target_file(2):" $target_file

loop

exit

------------------
Lon Geefshuysen (MCP)
kixtart.to/lon
lon@kixtart.to


Top
#48051 - 1999-08-20 12:03 AM Re: invalid syntax 'until not exist' doesn't give parser error!
Anonymous
Unregistered


My point is the bug in parser.
Who can fix this bug?

Regards

Michael Holzer


Top
#48052 - 1999-08-20 02:49 AM Re: invalid syntax 'until not exist' doesn't give parser error!
Anonymous
Unregistered


I don't see it as a bug.
If a command or operator is not implemented it isn't a bug, it's just not there.

And as there is an other function to solve the problem you have it is not a function or operator that needs to be implemented.

(NB. Kixtart32 is not the same as Novell's logon script.)

------------------
Lon Geefshuysen (MCP)
kixtart.to/lon
lon@kixtart.to


Top
#48053 - 1999-08-20 03:12 AM Re: invalid syntax 'until not exist' doesn't give parser error!
Anonymous
Unregistered


Well it seems to get philosophic.
I consider it a bug when a parser
doesn't detect an invalid expression I code.
According to the documentation 'until not exist' is invalid but this is not reported by the parser!

Best Regards

Michael Holzer

Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 2220 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.054 seconds in which 0.028 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org