The below code sinppet causes the following crash:
ERROR: Traceback (most recent call last):
File "E:\branch1508\packaging\windows\build\installer\out00-PYZ.pyz\pcbasic.run", line 66, in run_once
File "E:\branch1508\packaging\windows\build\installer\out00-PYZ.pyz\pcbasic.statements", line 108, in parse_statement
File "E:\branch1508\packaging\windows\build\installer\out00-PYZ.pyz\pcbasic.statements", line 1979, in exec_input
File "E:\branch1508\packaging\windows\build\installer\out00-PYZ.pyz\pcbasic.devices", line 403, in read_var
File "E:\branch1508\packaging\windows\build\installer\out00-PYZ.pyz\pcbasic.devices", line 423, in _input_entry
File "E:\branch1508\packaging\windows\build\installer\out00-PYZ.pyz\pcbasic.devices", line 411, in _skip_whitespace
TypeError: 'in <string>' requires string as left operand, not bytearray
This code uses an oddness in GW-BASIC:
10 OPEN "r",1,"test"
20 PRINT #1,"Hello"
30 PUT 1,1
40 GET 1,1
50 INPUT #1,a$
60 PRINT a$
Best,
Steve
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
JUST TRYING TO LEARN USB DATA ACQUISITION
PROGRAM:
10 CLS
20 COM1=COM20:
30 OPEN "COM1 1200,8" AS #1
40 INPUT #1,A
50 PRINT A
60 END
RESULTS IN A BUG REPORT:
Note that I don't think line 20 does what you think it does - if you want to assign COM1 to the Windows port COM20 you'll need to set this in the configuration file, not in the program. As it is you're just assigning two BASIC variables.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Rob,
The below code sinppet causes the following crash:
ERROR: Traceback (most recent call last):
File "E:\branch1508\packaging\windows\build\installer\out00-PYZ.pyz\pcbasic.run", line 66, in run_once
File "E:\branch1508\packaging\windows\build\installer\out00-PYZ.pyz\pcbasic.statements", line 108, in parse_statement
File "E:\branch1508\packaging\windows\build\installer\out00-PYZ.pyz\pcbasic.statements", line 1979, in exec_input
File "E:\branch1508\packaging\windows\build\installer\out00-PYZ.pyz\pcbasic.devices", line 403, in read_var
File "E:\branch1508\packaging\windows\build\installer\out00-PYZ.pyz\pcbasic.devices", line 423, in _input_entry
File "E:\branch1508\packaging\windows\build\installer\out00-PYZ.pyz\pcbasic.devices", line 411, in _skip_whitespace
TypeError: 'in <string>' requires string as left operand, not bytearray
This code uses an oddness in GW-BASIC:
10 OPEN "r",1,"test"
20 PRINT #1,"Hello"
30 PUT 1,1
40 GET 1,1
50 INPUT #1,a$
60 PRINT a$
Best,
Steve
Thanks Steve - I'll look into it.
Bug tracker here https://github.com/robhagemans/pcbasic/issues/22
View and moderate all "[CLOSED] Bug reports" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
JUST TRYING TO LEARN USB DATA ACQUISITION
PROGRAM:
10 CLS
20 COM1=COM20:
30 OPEN "COM1 1200,8" AS #1
40 INPUT #1,A
50 PRINT A
60 END
RESULTS IN A BUG REPORT:
Thanks for the report, I'll have a look at it.
Note that I don't think line 20 does what you think it does - if you want to assign
COM1
to the Windows portCOM20
you'll need to set this in the configuration file, not in the program. As it is you're just assigning two BASIC variables.