Skip to main content
added 375 characters in body
Source Link
Patrick Schlüter
  • 4.4k
  • 1
  • 16
  • 23

On the Sharp PC-1211 pocket computer (also rebranded as TRS-80 PC1 and as variants PC-1210/PC-1212) you could omit the LET keyword for simple assignments but you were required to use it in an IF statement as there was no THEN keyword (and no ELSE obviously) which would require a keyword to mark the end of boolean expression.

10: A=1
20: IF B=10LET A=2:GOTO 40
30: PRINT "A*B=";AB: REM * as multiplication was also optional
40: END

Later models based on the SC61860 ESR-H cpu (PC-12??, PC-13?0, PC-14??, etc.) added the THEN keyword but still required the LET after the THEN but only there.

EDIT: UncleBod comment added to answer

here is an interesting reason that LET still was mandatory after THEN. If there is no keyword after THEN the following part is calculated as a line number. A=2 would result in GOTO 1 (if it was a true comparison) or GOTO 0 otherwise. Line number 1 might exist, but never line number 0. (Just tested on a PC-1262) – UncleBod

On the Sharp PC-1211 pocket computer (also rebranded as TRS-80 PC1 and as variants PC-1210/PC-1212) you could omit the LET keyword for simple assignments but you were required to use it in an IF statement as there was no THEN keyword (and no ELSE obviously) which would require a keyword to mark the end of boolean expression.

10: A=1
20: IF B=10LET A=2:GOTO 40
30: PRINT "A*B=";AB: REM * as multiplication was also optional
40: END

Later models based on the SC61860 ESR-H cpu (PC-12??, PC-13?0, PC-14??, etc.) added the THEN keyword but still required the LET after the THEN but only there.

On the Sharp PC-1211 pocket computer (also rebranded as TRS-80 PC1 and as variants PC-1210/PC-1212) you could omit the LET keyword for simple assignments but you were required to use it in an IF statement as there was no THEN keyword (and no ELSE obviously) which would require a keyword to mark the end of boolean expression.

10: A=1
20: IF B=10LET A=2:GOTO 40
30: PRINT "A*B=";AB: REM * as multiplication was also optional
40: END

Later models based on the SC61860 ESR-H cpu (PC-12??, PC-13?0, PC-14??, etc.) added the THEN keyword but still required the LET after the THEN but only there.

EDIT: UncleBod comment added to answer

here is an interesting reason that LET still was mandatory after THEN. If there is no keyword after THEN the following part is calculated as a line number. A=2 would result in GOTO 1 (if it was a true comparison) or GOTO 0 otherwise. Line number 1 might exist, but never line number 0. (Just tested on a PC-1262) – UncleBod

added 162 characters in body
Source Link
Patrick Schlüter
  • 4.4k
  • 1
  • 16
  • 23

On the Sharp PC-1211 pocket computer (also rebranded as TRS-80 PC1 and as variants PC-1210/PC-1212) you could omit the LET keyword for simple assignments but you were required to use it in an IF statement as there was no THEN keyword (and no ELSE obviously) which would require a keyword to mark the end of boolean expression.

10: A=1
20: IF B=10LET A=2:GOTO 40
30: PRINT "A*B=";AB: REM * as multiplication was also optional
40: END

Later models based on the SC61860 ESR-H cpu (PC-12??, PC-13?0, PC-14??, etc.) added the THEN keyword but still required the LET after the THEN but only there.

On the Sharp PC-1211 pocket computer (also rebranded as TRS-80 PC1 and as variants PC-1210/PC-1212) you could omit the LET keyword for simple assignments but you were required to use it in an IF statement as there was no THEN keyword (and no ELSE obviously) which would require a keyword to mark the end of boolean expression.

10: A=1
20: IF B=10LET A=2:GOTO 40
30: PRINT "A*B=";AB: REM * as multiplication was also optional
40: END

On the Sharp PC-1211 pocket computer (also rebranded as TRS-80 PC1 and as variants PC-1210/PC-1212) you could omit the LET keyword for simple assignments but you were required to use it in an IF statement as there was no THEN keyword (and no ELSE obviously) which would require a keyword to mark the end of boolean expression.

10: A=1
20: IF B=10LET A=2:GOTO 40
30: PRINT "A*B=";AB: REM * as multiplication was also optional
40: END

Later models based on the SC61860 ESR-H cpu (PC-12??, PC-13?0, PC-14??, etc.) added the THEN keyword but still required the LET after the THEN but only there.

Source Link
Patrick Schlüter
  • 4.4k
  • 1
  • 16
  • 23

On the Sharp PC-1211 pocket computer (also rebranded as TRS-80 PC1 and as variants PC-1210/PC-1212) you could omit the LET keyword for simple assignments but you were required to use it in an IF statement as there was no THEN keyword (and no ELSE obviously) which would require a keyword to mark the end of boolean expression.

10: A=1
20: IF B=10LET A=2:GOTO 40
30: PRINT "A*B=";AB: REM * as multiplication was also optional
40: END