Author Topic: "then" allowed in multiline if statements  (Read 2790 times)

Offline FutureCow

  • HelpEditor
  • Prof. Inline
  • ******
  • Posts: 680
    • View Profile
Is it possible to allow "then" to be allowed in multiline if commands?

I have a tendancy to write
if [blah] then
   do this
else
   do that
end if

It would make my life easier if that was accepted by the compiler, or at least automatically removed if you typed "if (blah) then [enter key]"

Not a big issue and there's probably a lot more exciting things on the priority list, but if it's a quick-fix then I'd find it helpful.

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10817
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: "then" allowed in multiline if statements
« Reply #1 on: 2009-Mar-05 »
no. THEN says: there must be ONE command following, that will be executed if the condition is true.

I won't change the language because of anyone's tendency, sorry.

IF a THEN b
IF a; ...; ELSE; ... ; ENDIF

Offline FutureCow

  • HelpEditor
  • Prof. Inline
  • ******
  • Posts: 680
    • View Profile
Re: "then" allowed in multiline if statements
« Reply #2 on: 2009-Mar-05 »
Fair enough, what about automatically removing the "then" if you press enter after it instead?
As I said, it doesn't overly worry me, it would just make things easier if it's not difficult to implement. If it is, then don't worry about it!  =D