Page 1 of 1
getting c nonsense in basic when trying to load a program through a string in +3 basic
Posted: Sun Aug 02, 2020 2:25 pm
by 777
strangely if i use load s$(to 8), it says nonsense in basic but works when i run it. but when i execute the command without a line no it works without an error. why is this?
Re: getting c nonsense in basic when trying to load a program through a string in +3 basic
Posted: Sun Aug 02, 2020 2:45 pm
by +3code
?
To me both runs without error
Re: getting c nonsense in basic when trying to load a program through a string in +3 basic
Posted: Sun Aug 02, 2020 2:55 pm
by PeterJ
777 wrote: ↑Sun Aug 02, 2020 2:25 pm
strangely if i use load s$(to 8), it says nonsense in basic but works when i run it. but when i execute the command without a line no it works without an error. why is this?
Post a screenshot.
Re: getting c nonsense in basic when trying to load a program through a string in +3 basic
Posted: Sun Aug 02, 2020 3:34 pm
by 777
PeterJ wrote: ↑Sun Aug 02, 2020 2:55 pm
777 wrote: ↑Sun Aug 02, 2020 2:25 pm
strangely if i use load s$(to 8), it says nonsense in basic but works when i run it. but when i execute the command without a line no it works without an error. why is this?
Post a screenshot.
https://www.picpasteplus.com/v.php?i=cdcc1baf1c
now its saying end of file found
Re: getting c nonsense in basic when trying to load a program through a string in +3 basic
Posted: Sun Aug 02, 2020 3:37 pm
by PeterJ
Do a screen grab of the output of the program and s$ when you run it as it was originally written.
Re: getting c nonsense in basic when trying to load a program through a string in +3 basic
Posted: Sun Aug 02, 2020 3:39 pm
by +3code
Re: getting c nonsense in basic when trying to load a program through a string in +3 basic
Posted: Sun Aug 02, 2020 3:40 pm
by 777
PeterJ wrote: ↑Sun Aug 02, 2020 3:37 pm
Do a screen grab of the output of the program and s$ when you run it as it was originally written.
https://www.picpasteplus.com/v.php?i=da2f960375
Re: getting c nonsense in basic when trying to load a program through a string in +3 basic
Posted: Sun Aug 02, 2020 3:46 pm
by 777
+3code wrote: ↑Sun Aug 02, 2020 3:39 pm
"Image does not exist"
its working
Re: getting c nonsense in basic when trying to load a program through a string in +3 basic
Posted: Mon Aug 03, 2020 12:30 am
by 777
PeterJ wrote: ↑Sun Aug 02, 2020 2:55 pm
777 wrote: ↑Sun Aug 02, 2020 2:25 pm
strangely if i use load s$(to 8), it says nonsense in basic but works when i run it. but when i execute the command without a line no it works without an error. why is this?
Post a screenshot.
here it is again
https://upload.picpaste.me/image/iujYP
Re: getting c nonsense in basic when trying to load a program through a string in +3 basic
Posted: Mon Aug 03, 2020 12:31 am
by 777
PeterJ wrote: ↑Sun Aug 02, 2020 3:37 pm
Do a screen grab of the output of the program and s$ when you run it as it was originally written.
here again...
https://upload.picpaste.me/image/iuQIx
Re: getting c nonsense in basic when trying to load a program through a string in +3 basic
Posted: Mon Aug 03, 2020 1:16 am
by +3code
I don't see the "nonsense in basic" error with that code.
Re: getting c nonsense in basic when trying to load a program through a string in +3 basic
Posted: Mon Aug 03, 2020 6:33 am
by PeterJ
Do you not need double quotes around the filename [mention]777[/mention]
Your code would I imagine result in:
Rather than
Which I imagine is why you are getting nonsense in basic.
Re: getting c nonsense in basic when trying to load a program through a string in +3 basic
Posted: Mon Aug 03, 2020 10:43 am
by 1024MAK
Re: getting c nonsense in basic when trying to load a program through a string in +3 basic
Posted: Mon Aug 03, 2020 12:11 pm
by +3code
PeterJ wrote: ↑Mon Aug 03, 2020 6:33 am
Which I imagine is why you are getting nonsense in basic.
I don't obtain any error with the code he posted.
Re: getting c nonsense in basic when trying to load a program through a string in +3 basic
Posted: Tue Aug 04, 2020 1:15 am
by 777
+3code wrote: ↑Mon Aug 03, 2020 12:11 pm
PeterJ wrote: ↑Mon Aug 03, 2020 6:33 am
Which I imagine is why you are getting nonsense in basic.
I don't obtain any error with the code he posted.
its ok i think ive sussed it. u cant load or merge anything when you have a program running. although you can save.
Re: getting c nonsense in basic when trying to load a program through a string in +3 basic
Posted: Tue Aug 04, 2020 10:47 am
by +3code
777 wrote: ↑Tue Aug 04, 2020 1:15 am
+3code wrote: ↑Mon Aug 03, 2020 12:11 pm
I don't obtain any error with the code he posted.
its ok i think ive sussed it. u cant load or merge anything when you have a program running. although you can save.
Ok, now I understand what you mean
The BASIC file to be loaded must be saved first as auto-run (with LINE), so all runs ok.
Re: getting c nonsense in basic when trying to load a program through a string in +3 basic
Posted: Tue Aug 04, 2020 11:33 am
by Joefish
I think someone should write a 'C' compiler that reports:
Re: getting c nonsense in basic when trying to load a program through a string in +3 basic
Posted: Tue Aug 04, 2020 12:12 pm
by PeterJ
Joefish wrote: ↑Tue Aug 04, 2020 11:33 am
I think someone should write a 'C' compiler that reports:
Slightly off topic, but this is a fun version of C:
https://lhartikk.github.io/ArnoldC/
This is an example of the syntax:
Code: Select all
IT'S SHOWTIME
TALK TO THE HAND "hello world"
YOU HAVE BEEN TERMINATED