Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using remark as data
#1
I have found a way(a very simple way) of using remarks in a program you are running. Here is the code

Code:
REM 1-2-3-4
REM 5-6-7-8
REM 9-10-11-12
CLS

OPEN "rem.bas" FOR INPUT AS #1
LINE INPUT #1, A$
CLOSE #1

PRINT MID$(A$, 45, 7)
PRINT MID$(A$, 55, 7)
PRINT MID$(A$, 65, 10)

This works well but is very hard to use or get to work from nothing. Does anyone know about this or can anyone help me with understanding it. Also try typing in.
Code:
Print A$
This gets a very strange response.
Reply
#2
Why would you use that when you can...

1. Use another file for data,
2. Append data at the end of the exe?
y smiley is 24 bit.
[Image: anya2.jpg]

Genso's Junkyard:
http://rel.betterwebber.com/
Reply
#3
I think DATA/READ would be better for what you're trying to do:

Code:
DATA 1, 2, 3, 4
DATA 5, 6, 7, 8
DATA 9, 10, 11, 12
CLS

FOR i = 1 TO 12
  READ a
  PRINT a
NEXT

(You could actually generate the numbers with the FOR loop, but I'm guessing you just picked those numbers for an example and intend to use different ones in your actual program...)
Reply
#4
Your source must have been saved in tokenized form rather than ASCII.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)