Author |
Message |
xmdxtreme

|
Posted: Tue Jun 01, 2004 3:42 pm Post subject: how to bring the black blinking thing next to the numbers? |
|
|
code: |
var num : real
var st : string := ""
var key : string (1)
put "Enter amount:" ..
Text.Locate (1,14)
put "$0.00" ..
loop
getch (key)
if strintok (key) then
st += key
end if
exit when key = chr (10)
num := strint (st) / 100
Text.Locate (1,14)
put "$", num : 0 : 2
locate (2, length (intstr (round (num))) + 5)
end loop
|
|
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
rhomer

|
Posted: Tue Jun 01, 2004 4:04 pm Post subject: (No subject) |
|
|
Sorry i'm a little confudes...What is your question? |
|
|
|
|
 |
xmdxtreme

|
Posted: Tue Jun 01, 2004 4:06 pm Post subject: (No subject) |
|
|
the black block that blinks i dunno whats the name its in the bottom middle when you run the program i want it to go next to the numbers not at the bottom, |
|
|
|
|
 |
rhomer

|
Posted: Tue Jun 01, 2004 4:11 pm Post subject: (No subject) |
|
|
for me when i run it its next to the numbers not at the bottom. |
|
|
|
|
 |
xmdxtreme

|
Posted: Tue Jun 01, 2004 4:14 pm Post subject: (No subject) |
|
|
erm type in a number then see... |
|
|
|
|
 |
rhomer

|
Posted: Tue Jun 01, 2004 4:18 pm Post subject: (No subject) |
|
|
Is this right?
code: |
var num : real
var st : string := ""
var key : string (1)
put "Enter amount:" ..
Text.Locate (1,14)
put "$0.00" ..
loop
getch (key)
if strintok (key) then
st += key
end if
exit when key = chr (10)
num := strint (st) / 100
Text.Locate (1,14)
put "$", num : 0 : 2..
Text.Locate (1,19)
end loop
|
|
|
|
|
|
 |
xmdxtreme

|
Posted: Tue Jun 01, 2004 4:21 pm Post subject: (No subject) |
|
|
hmm thats good thanks but if you type in more number look what happens i hope theres a way to fix that  |
|
|
|
|
 |
xmdxtreme

|
Posted: Tue Jun 01, 2004 4:24 pm Post subject: (No subject) |
|
|
wait is there a way just to remove the blinking box for that section if that makes it easier? |
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
rhomer

|
Posted: Tue Jun 01, 2004 4:24 pm Post subject: (No subject) |
|
|
Ok try this...
code: |
var num : real
var st : string := ""
var key : string (1)
var col : int := 19
var count :int := 0
put "Enter amount:" ..
Text.Locate (1, 14)
put "$0.00" ..
loop
getch (key)
count += 1
if strintok (key) then
st += key
end if
exit when key = chr (10)
num := strint (st) / 100
Text.Locate (1, 14)
put "$", num : 0 : 2 ..
if count > 3 then
col += 1
end if
Text.Locate (1, col)
end loop
|
|
|
|
|
|
 |
Paul

|
Posted: Tue Jun 01, 2004 4:27 pm Post subject: (No subject) |
|
|
to remove the blinking box (cursor) you do this at the top
code: |
setscreen ("nocursor")
|
|
|
|
|
|
 |
xmdxtreme

|
Posted: Tue Jun 01, 2004 4:27 pm Post subject: (No subject) |
|
|
YES! THANKS ALOT I more question can you explain what happened cause i dont want to use code without understanding it rhomer. |
|
|
|
|
 |
rhomer

|
Posted: Tue Jun 01, 2004 4:28 pm Post subject: (No subject) |
|
|
setscreen("nocursor") will do it |
|
|
|
|
 |
xmdxtreme

|
Posted: Tue Jun 01, 2004 4:29 pm Post subject: (No subject) |
|
|
no i thought it would be hard to to the cursor thing so i want it to be there i just wanted to make it easier for you but i saw that you did it with cursor can you just explain what you did? |
|
|
|
|
 |
Paul

|
Posted: Tue Jun 01, 2004 4:30 pm Post subject: (No subject) |
|
|
lol you guys sure get excited... u don't even look at my post... |
|
|
|
|
 |
rhomer

|
Posted: Tue Jun 01, 2004 4:33 pm Post subject: (No subject) |
|
|
ya sure...well what i noticed is that you had to locate the column in front of the 2nd decimal place. what i did was say that if you type in three numbers then on the fouth it will move over 1 column. ( i did this with count and column
code: |
var col : int := 19
var count :int := 0
|
code: |
getch (key)
count += 1
|
code: |
if count > 3 then
col += 1
end if
Text.Locate (1, col)
|
|
|
|
|
|
 |
|