Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 how to bring the black blinking thing next to the numbers?
Index -> Programming, Turing -> Turing Help
Goto page 1, 2  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
xmdxtreme




PostPosted: 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
Sponsor
sponsor
rhomer




PostPosted: Tue Jun 01, 2004 4:04 pm   Post subject: (No subject)

Sorry i'm a little confudes...What is your question?
xmdxtreme




PostPosted: 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




PostPosted: 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




PostPosted: Tue Jun 01, 2004 4:14 pm   Post subject: (No subject)

erm type in a number then see...
rhomer




PostPosted: 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




PostPosted: 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 Confused
xmdxtreme




PostPosted: 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?
rhomer




PostPosted: 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




PostPosted: 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




PostPosted: 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 Very Happy rhomer.
rhomer




PostPosted: Tue Jun 01, 2004 4:28 pm   Post subject: (No subject)

setscreen("nocursor") will do it
xmdxtreme




PostPosted: 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




PostPosted: 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




PostPosted: 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)
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 2  [ 16 Posts ]
Goto page 1, 2  Next
Jump to:   


Style:  
Search: