
-----------------------------------
josh
Sat Feb 14, 2004 6:57 pm

Put With Line Spaces
-----------------------------------
I am a real newbee and I can't figure out what I have to do to my code in order for it to put spaces bewteen my different lines becasue right now it is very hard to read all clumped together.

-----------------------------------
Cervantes
Sat Feb 14, 2004 7:27 pm


-----------------------------------
you can use 
locate (row, col)
locatexy (x,y)
put ""

the last one there simply draws a blank space, moving the next put statement down one row.

-----------------------------------
Delos
Sat Feb 14, 2004 8:28 pm


-----------------------------------

put "All sorts of stuff."
put "More sorts of stuff."

delay (1000)
% Pause for a moment of reflection.
cls

put "All sorts of stuff."
put ""
put "More sorts of stuff."

delay (1000)
% Pause for another moment of reflection.
cls

locate (2,1)
% Locate row 2, column 1.
put "All sorts of stuff."

locate (4, 1)
% Drop down to the forth row.
put "More sorts of stuff."

% Pause for yet another moment of reflection.
cls

put "All sorts of stuff."
put skip
% Skip some lines...whitespace...its complicated...but yeah.
% It skips lines.
put "More sorts of stuff."


Enjoy.

-----------------------------------
josh
Sat Feb 14, 2004 9:41 pm


-----------------------------------
thanks you guys this makes my program so much easier to understand.

-----------------------------------
sport
Sun Feb 15, 2004 3:21 pm


-----------------------------------

var number:int:=99
var name:string:="Hello"
put name:7
%will put the name and put 2 more spaces after it (length of name is 5, 7-5=2)
put number:4
%for numbers i will pu spaces before the number. Put two spaces and then 99.
put number:7:2
%will also put 2 decimal spaces

-----------------------------------
zylum
Sun Feb 15, 2004 3:42 pm


-----------------------------------
or you could just use '\n' 


put "blablabla"
put "more blablabla\n"
%new paragraph
put "there is a blank above this line"
put "blablabla"


-zylum

-----------------------------------
Cervantes
Sun Feb 15, 2004 4:26 pm


-----------------------------------

put "blablabla" 
put "more blablabla\n" 
%new paragraph 
put "there is a blank above this line" 
put "blablabla" 

that doesn't solve the problem quite.  He wanted to put an extra space between his lines.

like so 


text text text

more text more text


not like so


text text text
more text more text



so for \n to work you'd actually have to put 2 \n 's in there.  It saves lines, but it makes your code harder to read.  For putting text outside of a loop use put "".  For text inside a loop use locate (row, col).  If you use the put "" inside a loop it'll continuasly draw the text on a new line which you don't want :eh:

-----------------------------------
apomb
Sun Feb 15, 2004 4:58 pm


-----------------------------------
so all someone could have just told him to use put " words words words" 
put skip
put "more words"

its just turing...not that hard!

-----------------------------------
Cervantes
Sun Feb 15, 2004 5:00 pm


-----------------------------------
dude.. read the thread :roll:
that was suggested along with many other methods.... :roll:

-----------------------------------
jonos
Sun Feb 15, 2004 5:38 pm


-----------------------------------
or, if you wanted to be really complicated and think about it, you could put just enough spaces extra at the one end of your first line to skip a line and then you wouldn't need an extra put statement  :D

-----------------------------------
zylum
Sun Feb 15, 2004 5:59 pm


-----------------------------------
if you run

put "blablabla"
put "more blablabla\n"
%new paragraph
put "there is a blank above this line"
put "blablabla"

it does leave a space -_-

-----------------------------------
Andy
Sun Feb 15, 2004 9:22 pm


-----------------------------------
i think this is what u want


drawfill (1, 1, green, blue)
put "blablabla" ..
locate (whatrow + 1, 1)
put "more blablabla" ..
locate (whatrow + 2, 1)
put "there is a blank above this line" ..
locate (whatrow + 1, 1)
put "blablabla" ..

whatrow and whatcol returns the row and col u are currently about to put text on
