Jump to content
IGNORED

Can't print periods?


Recommended Posts

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!

Link to comment
Share on other sites

Screenshot2024-04-04092735.thumb.png.5130868d4df770ad67c58053ffd9a35a.png

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.

 

Link to comment
Share on other sites

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

  • Like 1
Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...