matttintoshplus Posted April 4 Share Posted April 4 Simple question probably. I'm trying print some text but I keep getting a syntax error when I put periods in the string. I also tried storing the period as a variable and printing that, still got a syntax error. If anyone knows a way around this it would be greatly appreciated. Thanks! Quote Link to comment Share on other sites More sharing options...
matttintoshplus Posted April 4 Author Share Posted April 4 I wrote an essay about the Commodore 64 and wanted to submit it to my professor as a d64 file to read on a c64 emulator. If anyone knows a better way to do this than a ton of print commands, feel free to let me know hahaha Quote Link to comment Share on other sites More sharing options...
+OLD CS1 Posted April 4 Share Posted April 4 Show your work. 1 Quote Link to comment Share on other sites More sharing options...
matttintoshplus Posted April 4 Author Share Posted April 4 Ignore the obvious spelling errors. It's only around 180 characters and if I read correctly, 255 is the max amount of characters in a print command. Also, I'm running vice on windows 11 if it helps. Tested some print commands with periods and it seemed to be working, so maybe it was something else? 2 hours ago, OLD CS1 said: Show your work. Quote Link to comment Share on other sites More sharing options...
+Bruce-Robert Pocock Posted April 4 Share Posted April 4 The maximum length of a BASIC command line entered at the prompt is 80 characters (two lines) Quote Link to comment Share on other sites More sharing options...
carlsson Posted April 4 Share Posted April 4 Uh oh. While BASIC theoretically supports up to 255 tokens per line, the editor only supports 80 characters per line when you type it in. That means after AV in AVERAGE, you have broken the editor and no longer are typing in a BASIC line. What you can do is to limit it to 80 characters per line and add a semi-colon after the ending quote to keep texts together: 10 PRINT"IN THE EARLY .... ON THE "; 15 PRINT"AVERAGE PERSON ... BLAH "; However when you run the program, it will flow across lines in a very non-pleasant way. What you should try is to follow in the steps of @newTIboyRob and locate a word processor for the C64 that is intended for typing in texts. You could supply the program together with your data for your professor to regretfully try to load. I suppose he/she is technically minded and interested in old computers, otherwise the risk is great that you get a bad degree on the course for making it unnecessarily difficult to access your work. A third suggestion is to use a letter/note editor like some of the demo groups used in the late 1980's. It will allow you to type in an essay including that it records when you make typos and have to backspace. It lets you select a font and background music, and the finished product can be stored as a standalone program to load and enjoy. Pretty much like the second option above but slightly less trouble to read it. Here are some suggestions of letter makers, though there may be more under different search phrases: https://csdb.dk/search/?seinsel=releases&search=letter maker&all=1 1 Quote Link to comment Share on other sites More sharing options...
+Bruce-Robert Pocock Posted April 4 Share Posted April 4 What I might do, in your place, would be to create a text file on a modern system, convert it to a SEQ file, and provide a simple BASIC program to read that SEQ file and print it to the display one page at a time … e.g. from https://www.c64-wiki.com/wiki/STATUS 10 REM READ FILE 20 OPEN 1,8,2,"0:TEXT FILE,S,R": REM OPEN FILE FILE 20 FOR S=0 TO 1: REM INFINITE LOOP, WHILE S = 0 30 GET#1,A$: REM READ A BYTE 40 PRINT A$;: REM VIEW THE BYTE ON THE SCREEN 50 S=255 AND ST: REM I NOT EQUAL TO 0 WHEN BIT 6 IS SET (END OF FILE) 60 NEXT S : REM LEAVE IF S > 0 70 CLOSE 1: REM CLOSE FILE 80 IF S AND 64 THEN PRINT "OK" You could augment that with breaking on each screen, &c. Converting via command-line would be something like this: petcat -w2 -o read,prg read-file.bas petcat -w2 -text -o text-file,seq text-file.txt c1541 format "read stuff",r0 d64 read-stuff.d64 8 write read,prg "read file",prg write text-file,seq "text file",seq list Quote Link to comment Share on other sites More sharing options...
+OLD CS1 Posted April 4 Share Posted April 4 2 hours ago, Bruce-Robert Pocock said: 20 FOR S=0 TO 1: REM INFINITE LOOP, WHILE S = 0 I love abusing FOR/NEXT like this. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.