getting c nonsense in basic when trying to load a program through a string in +3 basic

The place for codemasters or beginners to talk about programming any language for the Spectrum.
Post Reply
+3code

Re: getting c nonsense in basic when trying to load a program through a string in +3 basic

Post by +3code »

777 wrote: Mon Aug 03, 2020 12:30 am
PeterJ wrote: Sun Aug 02, 2020 2:55 pm Post a screenshot.
here it is again

https://upload.picpaste.me/image/iujYP
I don't see the "nonsense in basic" error with that code.
User avatar
PeterJ
Site Admin
Posts: 6873
Joined: Thu Nov 09, 2017 7:19 pm
Location: Surrey, UK

Re: getting c nonsense in basic when trying to load a program through a string in +3 basic

Post by PeterJ »

Do you not need double quotes around the filename [mention]777[/mention]

Your code would I imagine result in:

Code: Select all

LOAD E
Rather than

Code: Select all

LOAD "E"
Which I imagine is why you are getting nonsense in basic.
User avatar
1024MAK
Bugaboo
Posts: 3118
Joined: Wed Nov 15, 2017 2:52 pm
Location: Sunny Somerset in the U.K. in Europe

Re: getting c nonsense in basic when trying to load a program through a string in +3 basic

Post by 1024MAK »

:!: Standby alert :!:
“There are four lights!”
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :dance
Looking forward to summer later in the year.
+3code

Re: getting c nonsense in basic when trying to load a program through a string in +3 basic

Post 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.
User avatar
777
Manic Miner
Posts: 512
Joined: Fri Jun 26, 2020 11:23 am
Location: sw uk

Re: getting c nonsense in basic when trying to load a program through a string in +3 basic

Post 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.
i started programming the spectrum when i was 8 :-

1 plot rnd*255,rnd*175
2 goto 1
+3code

Re: getting c nonsense in basic when trying to load a program through a string in +3 basic

Post 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 :D

The BASIC file to be loaded must be saved first as auto-run (with LINE), so all runs ok.
User avatar
Joefish
Rick Dangerous
Posts: 2058
Joined: Tue Nov 14, 2017 10:26 am

Re: getting c nonsense in basic when trying to load a program through a string in +3 basic

Post by Joefish »

I think someone should write a 'C' compiler that reports:

Code: Select all

Error: Basic nonsense in C
:lol:
User avatar
PeterJ
Site Admin
Posts: 6873
Joined: Thu Nov 09, 2017 7:19 pm
Location: Surrey, UK

Re: getting c nonsense in basic when trying to load a program through a string in +3 basic

Post by PeterJ »

Joefish wrote: Tue Aug 04, 2020 11:33 am I think someone should write a 'C' compiler that reports:

Code: Select all

Error: Basic nonsense in C
:lol:
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
Post Reply