Christmas Fun

Anything QL Software or Programming Related.
User avatar
Cristian
QL Wafer Drive
Posts: 1024
Joined: Mon Feb 16, 2015 1:40 pm
Location: Veneto

Re: Christmas Fun

Post by Cristian »

The code seems corrupted. Also in real QL, Qemulator, JM, Minerva... What am I doing wrong?
claus.gif


User avatar
Andrew
QL Wafer Drive
Posts: 1033
Joined: Tue Jul 17, 2018 9:10 pm

Re: Christmas Fun

Post by Andrew »

Cristian wrote: Wed Dec 28, 2022 7:13 pm The code seems corrupted. Also in real QL, Qemulator, JM, Minerva... What am I doing wrong?claus.gif
You probably saved it on a DOS drive and edited it with an editor that saved it as a DOS file, with lines ending with CR LF (or maybe Macintosh - CR)
QDOS code is like unix code, each line should end only with LF
Because of that CR at the end of each line QDOS marks all lines as MISTake

Load the code in Notepad++ and from the bottom bar set it as Unix(LF) and save it.


User avatar
Cristian
QL Wafer Drive
Posts: 1024
Joined: Mon Feb 16, 2015 1:40 pm
Location: Veneto

Re: Christmas Fun

Post by Cristian »

No I didn't. I opened the downloaded .zip file directly with Qemulator (I've always used this method for zipped files with success)
Last edited by Cristian on Wed Dec 28, 2022 8:07 pm, edited 1 time in total.


User avatar
Andrew
QL Wafer Drive
Posts: 1033
Joined: Tue Jul 17, 2018 9:10 pm

Re: Christmas Fun

Post by Andrew »

Cristian wrote: Wed Dec 28, 2022 7:46 pm No I didn't. I opened the downloaded .zip file directly with Qemulator
That is strange - I created the zip file on QL, not in Windows
I checked now the last zip that I loaded - all lines end with 0A (LF)


User avatar
Andrew
QL Wafer Drive
Posts: 1033
Joined: Tue Jul 17, 2018 9:10 pm

Re: Christmas Fun

Post by Andrew »

Mystery solved: you probaly downloaded the file Santa2.zip. That was not uploaded by me. That is the version that was edited and modified by bwinkel67.
And in that zip file the code was saved as a DOS file, each line ending with 0D 0A (CR LF)
Download the last Santa.zip version uploaded by me, in page 2 of this thread


User avatar
Cristian
QL Wafer Drive
Posts: 1024
Joined: Mon Feb 16, 2015 1:40 pm
Location: Veneto

Re: Christmas Fun

Post by Cristian »

Thank you very Much Andrew.
So, a friendly "slap on the wrist" to bwinkel67 :)


User avatar
Andrew
QL Wafer Drive
Posts: 1033
Joined: Tue Jul 17, 2018 9:10 pm

Re: Christmas Fun

Post by Andrew »

We all did that more than once :D And the fix is easy: just load the code in Notepad++, set it as Unix(LF) and save it again


Derek_Stewart
Font of All Knowledge
Posts: 4684
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: Christmas Fun

Post by Derek_Stewart »

Hi,

A silly question, why not write the basic programs in the QL emulator as Toolkit 2 ED is a really good screen editor?


Regards,

Derek
User avatar
tofro
Font of All Knowledge
Posts: 3097
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: Christmas Fun

Post by tofro »

Derek_Stewart wrote: Thu Dec 29, 2022 8:58 am Hi,

A silly question, why not write the basic programs in the QL emulator as Toolkit 2 ED is a really good screen editor?
A simple answer, because ED can't convert CR/LF line endings to LF, which was the point of Andrew's proposal.


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
Derek_Stewart
Font of All Knowledge
Posts: 4684
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: Christmas Fun

Post by Derek_Stewart »

tofro wrote: Thu Dec 29, 2022 9:05 am
Derek_Stewart wrote: Thu Dec 29, 2022 8:58 am Hi,

A silly question, why not write the basic programs in the QL emulator as Toolkit 2 ED is a really good screen editor?
A simple answer, because ED can't convert CR/LF line endings to LF, which was the point of Andrew's proposal.
OK, good pint well made...

But if the program was written in the emulator and saved in a QL environment, this problem would not occurr.


Regards,

Derek
Post Reply