Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
End if
#5
Darkstar Wrote:
boriel Wrote:I've been seriously thinking in this, and the only solution I've come up with is that implementing "Single line" IFs will be exclusive (that is, when enable, END IF will be disabled).

Yes, I agree. All things considered then this is the ONLY viable solution in my view.

I think there's another solution: SAM Coupé's SAM BASIC and MasterBASIC, written by Andy Wright. already solved the same problem: An IF without a THEN or with no command after its THEN would be multiline and would need an END IF. In ZX BASIC, this behaviour would be optional, as you said.

Code:
#pragma sinclair_basic_compat ' ...or whatever name

IF a=1 THEN PRINT "This is old code pasted from Sinclair BASIC"

if b=2
  print "This is modern code"
end if

if b=3 then
  print "this is modern code too"
end if

IF PI THEN BEEP 1,2:PRINT "MORE OLD CODE"

What do you think? Would it be feasible?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)