
-----------------------------------
Boarder16
Mon Jan 12, 2004 3:31 pm

VERY SIMPLE PUT PROBLEM
-----------------------------------
Hey this is a seperate project(not skewl related) i am workign on... i made  a veriable(string) and i give it a value with LOTS of text... i want it to show like this when  icall it to put...

balance                 564
  subtraction        34
balance                 520

so on... i jsut want to know is when  igive th variable a text value do i HAVE to put it like this....

text:= "balance              564                                                            subtraction            34                                                                 balance          520"
where there are lots of spaces so it shwos it on teh next line, or is tehre a way  ican do sumthign where i type it ut liek this...

put "balance             564
        subtraction     34
      babalala so on....
and it wil give that value to the variable???

-----------------------------------
Thuged_Out_G
Mon Jan 12, 2004 4:03 pm


-----------------------------------
i dont think so...use an array or a variable for each line of text
there might be a way to put an amount of characters from the variable to the string

put (length(word)-10)

that might give you everything but the last characters(MIGHT)
im not positive on that

-----------------------------------
McKenzie
Mon Jan 12, 2004 4:21 pm


-----------------------------------
% \n is the newline character
put "Hey\nThis\nis\ncool\n"

-----------------------------------
Boarder16
Mon Jan 12, 2004 4:53 pm


-----------------------------------
holy sh*t i never knew that thanks a lot.. this will save me tones of time..

thanks 8)

-----------------------------------
DanShadow
Mon Jan 12, 2004 6:51 pm


-----------------------------------
hmm! I thought  \n  was only used in  the 'C' language, lol! tx, Ill probably end up using that if I go back from graphical programming.

-----------------------------------
Andy
Mon Jan 12, 2004 8:05 pm


-----------------------------------
well turing compiles into C then does work there... but why use that when u have skip?

-----------------------------------
AsianSensation
Mon Jan 12, 2004 8:06 pm


-----------------------------------
cuz skip and \n are the exact same thing.

-----------------------------------
Thuged_Out_G
Tue Jan 13, 2004 3:07 pm


-----------------------------------
well, skip has other uses, like when your reading from a file


var stream:int
var line:string

open:stream,"file.txt",get
assert stream>0

loop
get:stream,skip   %skip all whitespace in the document
get:stream,line:*
exit when eof(stream)
end loop 


-----------------------------------
AsianSensation
Tue Jan 13, 2004 5:57 pm


-----------------------------------
not really, when reading from a txt file, unless you did this:

get: filein, word :*

then it would get all the stuff up to any white spaces, and stop there, and I am pretty sure instead of using skip, you can just use '\n' instead.
