Page 1 of 1 1
Topic Options
#212323 - 2017-03-06 07:04 AM No syntax error when code is placed in between Select and first Case
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4545
Loc: USA
Please see the following example.

 Code:
$test=1

select
  ? "HEY THIS IS IMPORTANT!!!! I Shouldn't be here but I am"
 case $test=1
   ? 1
 case $test=2
   ? 2
 case 1
   ? 3
endselect


In the example above, The line right after the select is never run. Any number of statements can be put between the SELECT and the first CASE and they will all be ignored as well. I found this completely by accident, and while it was nice that Kix just kept working despite my syntax error, it would have saved me quite a bit of time trouble shooting the problem had kix just thrown a syntax error when the script was run.

Top
#213769 - 2019-11-04 07:24 PM Re: No syntax error when code is placed in between Select and first Case [Re: Allen]
Ruud van Velsen Moderator Offline
Developer
*****

Registered: 1999-05-06
Posts: 391
Loc: Amsterdam, The Netherlands
... ah well, never too late to fix a solid syntax error.

I'm working on a mini-update to deal with OS-naming issues related to Windows Server 2019, and I've just fixed this one as well :-)

Thanks for the report!

Top
#213770 - 2019-11-04 11:01 PM Re: No syntax error when code is placed in between Select and first Case [Re: Ruud van Velsen]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
Thanks, Ruud


Glad to hear and see you're still with us updating

Top
#213771 - 2019-11-04 11:08 PM Re: No syntax error when code is placed in between Select and first Case [Re: NTDOC]
DaveLipman Offline
Fresh Scripter

Registered: 2005-07-13
Posts: 33
Loc: NJ, USA
This KiX Phan is still here after all these years !

I am happy to see the author post.


Top
#213773 - 2019-11-05 08:14 AM Re: No syntax error when code is placed in between Select and first Case [Re: DaveLipman]
Ruud van Velsen Moderator Offline
Developer
*****

Registered: 1999-05-06
Posts: 391
Loc: Amsterdam, The Netherlands
:-) :-) :-)

Glad to be here and happy to see so many diehards keeping the fire burning :-)

If there are any pressing issues that need fixing: let me know.

Ruud

Top
#213857 - 2020-04-27 12:26 PM Re: No syntax error when code is placed in between Select and first Case [Re: Ruud van Velsen]
PRandal Offline
Fresh Scripter

Registered: 2002-07-17
Posts: 28
I'd love to see a new release of KiXtart which correctly reports OS version names.

Any progress on this?

Top
Page 1 of 1 1


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

Who's Online
1 registered (Allen) and 382 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.055 seconds in which 0.023 seconds were spent on a total of 13 queries. Zlib compression enabled.