|
Post by johnp on Jul 25, 2022 10:34:39 GMT
I recently wrote a 6502 Assembler program in Basic on my old Plus 4. As part of the program it formats strings and uses Mid$ = mid$ extensively to build output using the input string and combines with the generated assembler code (and any errors) as an output to the user. Example of use of mid$- 100 mid$(z$,1,5)= mid$(x$,3,5). This is fine on the the plus 4.
I thought I would invest in a TheC64 and then transport the .PRG across from the PLus 4. All ok, got there in the end but.....mid$ = mid$ gives a syntax error. X$=mid$(etc is fine.
Ive tried to work it all different ways but it would seem mid$=mid$ is not in TheC64 set, even thiough it was OK on a C64.
I guess i can program round it using a an array and refence the position in the string by character and moving individual characters into array elements (thats a lot of work for me to do !)
anyone know why mid$=mid$ is syntax error on thec64? Ive updated it to the latest release so it isnt that..
Thanks John
|
|
|
Post by jj0 on Jul 25, 2022 17:22:09 GMT
The Plus/4 uses BASIC v3.5, the C64 uses BASIC v2. In BASIC v2 MID$ is only a function for the right did of the =, not the left side.
|
|