Hi from the USA - Sacramento CA
-
- Posts: 24
- Joined: Fri Jun 17, 2022 5:51 pm
- Location: Sacramento, CA
Hi from the USA - Sacramento CA
Hi Everyone,
I am wasPentalive (I was Pentalive in another forum, but I lost the account (email and password fail at the same time ugh) so now I am "WasPentalive"
My icon is the R-Pentamino from John Conway's game of life.
I was a C64 owner back in the day and perhaps will own an X16 when the become physical - for now, Basic programming in the emulator!
Attached is my firs program - It calculates the Colatz series for any given positive integer - If you can find an integer that does not eventually go to 1 you can win a prize (not from me tho) - https://en.wikipedia.org/wiki/Collatz_conjecture . Perhaps I should have put the .prg suffix on?
COLATZ
- desertfish
- Posts: 1097
- Joined: Tue Aug 25, 2020 8:27 pm
- Location: Netherlands
Hi from the USA - Sacramento CA
Hi and welcome!
Basic programs usually have the .BAS suffix !
What does "limit reached" mean?
Hi from the USA - Sacramento CA
On 6/17/2022 at 12:36 PM, desertfish said:
Hi and welcome!
Basic programs usually have the .BAS suffix !
What does "limit reached" mean?
Actually, this is a tokenized BASIC file. So either PRG or a blank extension is just fine. When working directly on the Commander, I actually prefer binary programs to have no extension, since the PRG is implied, but you want PRG when using it with PC based software, since that's what most of us expect to see when working with Commodore binaries.
The only time you should on use a .BAS extension is when the file is in ASCII format and not tokenized. (ie: you can view it on a PC with Notepad.) Personally, I prefer BASIC programs in text format, since I can look at them before loading them into the emulator.
-
- Posts: 24
- Joined: Fri Jun 17, 2022 5:51 pm
- Location: Sacramento, CA
Hi from the USA - Sacramento CA
Quote
What does "limit reached" mean?
In the Colatz Conjecture - you start with a positive integer. Thru the operation of the conjecture the number is modified each step. On some steps it will go up (3 *n +1) and on others it will go down ( n / 2) - at some point the current step will be below the starting point. If you had been trying consecutive numbers up until this number you could stop at that point, because you had tried each number below the number you are trying now.