Author |
Message |
Boarder16
|
Posted: Mon Jan 12, 2004 3:31 pm Post subject: 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??? |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Thuged_Out_G
|
Posted: Mon Jan 12, 2004 4:03 pm Post subject: (No subject) |
|
|
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
|
Posted: Mon Jan 12, 2004 4:21 pm Post subject: (No subject) |
|
|
% \n is the newline character
put "Hey\nThis\nis\ncool\n" |
|
|
|
|
|
Boarder16
|
Posted: Mon Jan 12, 2004 4:53 pm Post subject: (No subject) |
|
|
holy sh*t i never knew that thanks a lot.. this will save me tones of time..
thanks 8) |
|
|
|
|
|
DanShadow
|
Posted: Mon Jan 12, 2004 6:51 pm Post subject: (No subject) |
|
|
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
|
Posted: Mon Jan 12, 2004 8:05 pm Post subject: (No subject) |
|
|
well turing compiles into C then does work there... but why use that when u have skip? |
|
|
|
|
|
AsianSensation
|
Posted: Mon Jan 12, 2004 8:06 pm Post subject: (No subject) |
|
|
cuz skip and \n are the exact same thing. |
|
|
|
|
|
Thuged_Out_G
|
Posted: Tue Jan 13, 2004 3:07 pm Post subject: (No subject) |
|
|
well, skip has other uses, like when your reading from a file
code: |
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
|
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
AsianSensation
|
Posted: Tue Jan 13, 2004 5:57 pm Post subject: (No subject) |
|
|
not really, when reading from a txt file, unless you did this:
code: | 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. |
|
|
|
|
|
|