Page 1 of 1

Unexpected Syntax Error in C64 Basic

Posted: Mon Nov 18, 2024 3:34 pm
by laurens

Hi - complete c64 novice here.

I found that the line

Code: Select all

10 PRINT CHR$(205.5+RND(1)); : GOTO 10 

supposedly gives a nice pattern when executed on the C64.

However, I get a syntax errror when I try it;

I boiled it down to RND(1) not working.

I'm running stock c64 after an update_all with biosses. The line at the top says commodore 64 basic V2, followed by dolphindos 2.0.

I also tried loading the 'standard' system rom, instead of the 'Loadable C64', but the result is the same. Quick internet search did not yield answers. Any clues, experts?


Re: Unexpected Syntax Error in C64 Basic

Posted: Mon Nov 18, 2024 4:10 pm
by Bas

Works in Vice as well as MiSTer for me. Do make sure you get an actual + sign and don't mix up your ; and :. Those are tricky from my PC keyboard attached to the MiSTer and fudged up my first attempt.

...so you' re a Tweaker eh? ;-)


Re: Unexpected Syntax Error in C64 Basic

Posted: Mon Nov 18, 2024 4:26 pm
by laurens

:) so you're a tweaker, eh :)

But: yeah, I think I typed everything correct;

c64error.png
c64error.png (1.73 MiB) Viewed 797 times

So yeah, I'm a bit stumped. I don't believe I have any weird settings in mister's setup for the c64.

So, yeah, idk!


Re: Unexpected Syntax Error in C64 Basic

Posted: Mon Nov 18, 2024 4:27 pm
by virtuali

That's not the plus sign! It's the PET-ASCII sign for the cross.


Re: Unexpected Syntax Error in C64 Basic

Posted: Mon Nov 18, 2024 8:16 pm
by laurens

Yup. Of course both of you were right, user error :) Thanks! It was the + that wasn't a plus. And I was surprized that excuting

Code: Select all

print "Hello" 

worked as I expected, so when

Code: Select all

rnd(1)

did not, I expected the syntax error to be due to my mister not being set up with the correct version of BASIC or something.

And just to clarify and prevent bans: Bas and I weren't calling eachother meth users - but referring to users of a Dutch tech website, tweakers.net :)

They reported on the passing of one of the inventors of BASIC, Thomas E. Kurtz. In the comments of the article, someone posted this oneliner, and I aimed to try it.