Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Read a text and attribute it to a variable
#10
(11-24-2023, 10:44 PM)SMcNeill Wrote: Can you not just write the text file with the formatting already done?

OPEN "Test.txt" FOR OUTPUT AS #1
PRINT #1, " QB64 Phoenix รจ (is) beatiful"
CLOSE #1

The topic starter wants to execute BASIC code that is loaded from a text file (another BASIC source code). Which is not possible, I guess unless the "host" BASIC program contains a BASIC interpreter.

It was expected to load the TEST.BAS and execute the PRINT statement together with the CHR$() call, to produce the accented "e". That's why I was (poorly) suggesting to check for such a line while loading that text file, to make sure it's genuine before using RUN to execute the BASIC code that is being loaded as text file. Confusing, yes I know...
Reply


Messages In This Thread
RE: Read a text and attribute it to a variable - by mnrvovrfc - 11-24-2023, 10:53 PM



Users browsing this thread: 2 Guest(s)