GLBasic forum

Feature request => IDE/Syntax => Topic started by: kaotiklabs on 2009-Jun-28

Title: SYNTAX - alias of <> to !=
Post by: kaotiklabs on 2009-Jun-28
Maybe would be useful to add the ! sign as NOT, like C language.

You know, liken an alias of <> to !=

Even could be used with boolean functions like:

Code: (glbasic) [Select]
while !GameFinished()

...

wend
Title: Re: SYNTAX - alias of <> to !=
Post by: Kitty Hello on 2009-Jun-29
WHILE NOT GameFinished() would be nice, right. It's on my TODO list.
Title: Re: SYNTAX - alias of <> to !=
Post by: Moru on 2009-Jun-29
In those basics I have used so far you use the NOT function that doesn't exist in GLBasic but can be easily made with a function like this: :-)

Code: (glbasic) [Select]
WHILE NOT(GameFinished())
// do the game
WEND

FUNCTION NOT: val
IF val = TRUE THEN RETURN FALSE
IF val = FALSE THEN RETURN TRUE
ENDFUNCTION