Case with a negative integer value not compiling

Get Help on scripting in POL with configurations, config setups, script trouble shooting, etc.

Moderator: POL Developer

Post Reply
xeon
Forum Regular
Posts: 338
Joined: Fri Oct 31, 2008 3:18 am
Location: Italy

Case with a negative integer value not compiling

Post by xeon » Wed Dec 25, 2019 2:24 pm

Hi all! Loooooong time inactive ... good to be back here :)

I dunno if I don't remember well or is just a bug. I'm trying to compile a script with a case like this

Code: Select all

case (variable)
       0: <some code>
       
       1: <some code>
      -1: <some code>
       2: <some code>
endcase
Well, ecompile is complaining about the line with the -1 as comparison value. Or just any negative value, for the matter.
Is it a bug in ecompile?

Yukiko
Distro Developer
Posts: 2734
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

Re: Case with a negative integer value not compiling

Post by Yukiko » Wed Dec 25, 2019 5:13 pm

I can confirm the issue. I even tried enclosing the -1 in parenthesis and still received the error.

xeon
Forum Regular
Posts: 338
Joined: Fri Oct 31, 2008 3:18 am
Location: Italy

Re: Case with a negative integer value not compiling

Post by xeon » Thu Dec 26, 2019 2:55 pm

Ciao Yukiko! How long :)

Thanks for confirming! Was wondering if I was missing out something obvious ...

Yukiko
Distro Developer
Posts: 2734
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

Re: Case with a negative integer value not compiling

Post by Yukiko » Thu Dec 26, 2019 3:51 pm

No. You were not wrong. I told the developers about it.? Glad to see you are still working with POL. :)

Post Reply