The L-BASIC compiler
#13
(01-07-2023, 04:01 PM)Kernelpanic Wrote:
Code: (Select All)
Option _Explicit

Dim PS As Double, KW As Double
Dim Auswahl As Integer

Print "1 -- PS in Kilowatt"
Print "2 -- Kilowatt in PS"
Print
Input "Ihre Wahl: ", Auswahl
Print

If Auswahl = 1 Then
  Input "Anzahl PS: ", PS
  KW = PS / 1.36

  Print -- Fehler?
  Print KW
Else
  Input "Anzahl Kilowatt: ", KW
  PS = KW * 1.36

  Print
  Print PS
End If

End

This line:
Code: (Select All)
Print -- Fehler?

The stuff after "Print" needs to be surrounded by double quotation marks.

I'm not able to run Luke's creation straight away but the "bad integer" or something like that might point to the "LOCATE , 2" line, might have to use "CSRLIN" function to get the current cursor line and fill in the "LOCATE row, column" instead of leaving out the row.

If not, it could be your using the apostrophe at the end of code lines.
Reply


Messages In This Thread
The L-BASIC compiler - by luke - 01-06-2023, 01:16 PM
RE: The L-BASIC compiler - by Kernelpanic - 01-06-2023, 08:06 PM
RE: The L-BASIC compiler - by cage - 01-06-2023, 10:24 PM
RE: The L-BASIC compiler - by SpriggsySpriggs - 01-10-2023, 02:39 PM
RE: The L-BASIC compiler - by mnrvovrfc - 01-06-2023, 10:59 PM
RE: The L-BASIC compiler - by mnrvovrfc - 01-08-2023, 08:22 PM
RE: The L-BASIC compiler - by Kernelpanic - 01-08-2023, 09:40 PM
RE: The L-BASIC compiler - by PhilOfPerth - 01-06-2023, 11:01 PM
RE: The L-BASIC compiler - by SMcNeill - 01-07-2023, 12:05 AM
RE: The L-BASIC compiler - by luke - 01-07-2023, 02:27 AM
RE: The L-BASIC compiler - by Kernelpanic - 01-07-2023, 04:01 PM
RE: The L-BASIC compiler - by mnrvovrfc - 01-07-2023, 11:57 PM
RE: The L-BASIC compiler - by Jack - 01-07-2023, 01:39 PM
RE: The L-BASIC compiler - by bplus - 01-07-2023, 02:40 PM
RE: The L-BASIC compiler - by Kernelpanic - 01-07-2023, 06:56 PM
RE: The L-BASIC compiler - by Kernelpanic - 01-07-2023, 08:15 PM
RE: The L-BASIC compiler - by luke - 01-08-2023, 05:08 AM
RE: The L-BASIC compiler - by Kernelpanic - 01-08-2023, 05:24 PM
RE: The L-BASIC compiler - by luke - 01-08-2023, 09:55 PM
RE: The L-BASIC compiler - by Kernelpanic - 01-08-2023, 11:21 PM
RE: The L-BASIC compiler - by a740g - 01-10-2023, 01:13 PM



Users browsing this thread: 10 Guest(s)