PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WEBDEV 2024 → Switch syntax error
Switch syntax error
Iniciado por Rafa, 02,may. 2016 10:42 - 3 respuestas
Publicado el 02,mayo 2016 - 10:42
Hi to all.

Webdev 19 throws this "Error:Syntax error in description of CASE", I think it has to be a very simple error but I see nothing...

SWITCH TypeVar( xPar )

CASE wlDate, wlDateTime:

...

CASE wlBoolean:

...

CASE wlInt:

...

CASE wlString:

...

OTHER CASE:

...

END
Publicado el 02,mayo 2016 - 13:49
I guess the syntax goes like this

Switch variable
Case 1: valuex
Case 2: valuey
Case 3: valuez
end
Publicado el 02,mayo 2016 - 15:46
It would be helpful for you to post the actual code and the error message you are receiving.

http://help.windev.com/en-US/…

Mike Peterson
T7Group.com
Publicado el 03,mayo 2016 - 12:29
I have found the error, its not from the switch syntax... In one of the cases, my code was an IF like this:
IF [CONDITION] THEN [CODE] ELSE [CODE] END


It seems that Windev dont want an IF in one line of code, I turned it to this and all worked:
IF [CONDITION] THEN
[CODE]
ELSE
[CODE]
END


Thanks to you guys.