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

Username:   Password: 
 RegisterRegister   
 Need Help coding a Clock program = Gmail Invite.
Index -> Programming, Turing -> Turing Help
Goto page 1, 2, 3  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
linecode




PostPosted: Thu Jun 17, 2004 3:18 pm   Post subject: Need Help coding a Clock program = Gmail Invite.

I have 2 Gmail invites, anyone interested in doing a program for me. I will give you a link to the turing software that is used in windows, as well as a document explaining the instructions to what the clock needs to look like and what it suppose to do? In return I will give u a Gmail invite to have 1 gig of email service from Google. Upon completion and the program being able to work, I will send you the invite.

Anyone interested PM. or post back..i will be checking it every so oftan. It is really important for me.

Thank you all in advance.
Sponsor
Sponsor
Sponsor
sponsor
Delos




PostPosted: Thu Jun 17, 2004 4:40 pm   Post subject: (No subject)

What category does this fall under?

Bribary?
Contractual Breech?
Plagarism?

Hehehe...the fun ticks on...
linecode




PostPosted: Thu Jun 17, 2004 4:43 pm   Post subject: (No subject)

I suck at coding. And i need help...and for the help my thank you would be by giving a invitation to a gmail account. its a nice gesture to thank the person for their help.

all i ask is for help.
DanShadow




PostPosted: Thu Jun 17, 2004 6:09 pm   Post subject: (No subject)

Ya see, there is no forum in the index for what your asking for. This is Turing Help, not "please do my damn project because im a lazy freak" forum. I decided to make the clock program decoding your computers clock, I even added an alarm feature. Now im just gonna sit an look at the program and think about you. And no, im not posting it, now go do your own work, if you have a question, ask, and we will help. Geez, if I was the Turing Mod, I would delete this.
linecode




PostPosted: Thu Jun 17, 2004 6:16 pm   Post subject: (No subject)

wow. if i knew how to code in turing i would do it. but i dont. why is everyone such an asshole so far that has posted?

i tried doing it...and im lost in doing it. why cant someone help me...in which i will show my gratitude back.

im sorry if i have offended people with my request. but i am just asking for help.
Mazer




PostPosted: Thu Jun 17, 2004 6:23 pm   Post subject: (No subject)

linecode wrote:
all i ask is for help.

No you didn't. Seriously, if you ask for help chances are we will help you. Come with a specific problem, and we can give you a hint or solution. Don't be stupid man, this really pisses us off.
linecode




PostPosted: Thu Jun 17, 2004 6:34 pm   Post subject: (No subject)

i need to make a command to the clock program that will have a put statement asking the user to input the starting time and the clock will set itself to that time and the next question the user will be asked whether in real time or in fast mode for the time to go in.

I figured out that i will need to set real time to 1000 and fast to 500 (or less) to go really quickly.

what code do i use so that the instructions the users commands for the clock to do?
Dan




PostPosted: Thu Jun 17, 2004 7:08 pm   Post subject: (No subject)

Here is the basick idea of how to do real time:

code:

var offset : int

put "in put start time in secs: "
get offset

var startTime : int := Time.Sec

loop
    cls
    put (Time.Sec - startTime) + offset
    delay(500)
end loop


to input time in a noraml format you can use the Time.DateSec to covert a string to a number in secs.

for fast time you could do the same thing but with a couter and a nomral dealy.

NOTE: in new verson of turing there is a Time.dealy method witch is an easer way to real time dealys then keeping track of the start time.
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
AsianSensation




PostPosted: Thu Jun 17, 2004 7:14 pm   Post subject: (No subject)

wait, do you want to reset the system clock, or are you just interested in keeping track of time in your own program?

it's rather hard to reset system clock with turing, but easier if you want to keep track of your own time. Use the time function, something like this:

code:
var second, t1, t2, choice : int := 0
put "How many seconds?"
get second
put "What mode?"
get choice

t1 := Time.Elapsed
loop
    t2 := Time.Elapsed
    if choice = 1 then
        if t2 - t1 >= 1000 then
            t2 := 0
            t1 := Time.Elapsed
            second += 1
        end if
    else
        if t2 - t1 >= 500 then
            t2 := 0
            t1 := Time.Elapsed
            second += 1
        end if
    end if
    put second
end loop


this asks the user to input how many seconds, and then it checks to see the time passed, and adds to your seconds variable every second or half second, depend what mode you chose.
linecode




PostPosted: Thu Jun 17, 2004 7:22 pm   Post subject: (No subject)

no need for a restart. just asked in the beginning...what time do you want to start the clock at? and then be asked....in real time or fast time? thats the main idea.

thank you for the help. i appreciate it extremely. as i havent gotten a warm welcome from some of the members due to the way I asked for help. but i was just being honest. I know the basics of turing, i am not advanced, i am a economics student...not a programmer.

I thank you for your help. and thank in advance for the further help I will recieve. Thank YOU! Very Happy
Delos




PostPosted: Thu Jun 17, 2004 8:04 pm   Post subject: (No subject)

Quote:

time ( var t : string )

Description The time statement is used to determine the current time of day. Variable t is assigned a string in the format "hh:mm:ss". For example, if the time is two minutes and 47 seconds after nine A.M., t will be set to "09:02:47". Twenty-four hour time is used. For example, eleven thirty P.M. gives the string "23:30:00".

Example This program greets you and tells you the time of day.

var timeOfDay : string
time ( timeOfDay )
put "Greetings!! The time is ", timeOfDay

Details Be warned that on some computers such as IBM PC compatibles or Apple Macintoshes, the time may not be set correctly in the operating system. In this case, the time procedure will give incorrect results.


I'm guessing that you don't have the helpfile on your version of Turing...we have the same type at school (no, I'm not being sarcastic...)

Hehehe...it's been a while since someone called me an @$$0...let's see...about a week now! Very Happy.

NEhow, just edit the above code a bit and
code:

var timeOfDay : string
loop
    time (timeOfDay)
    locate (1, 1)
    put "Greetings!!  The time is ", timeOfDay
    exit when hasch
    % as soon as you press a key it exits.
end loop


Now that you've seen 3 or so examples of how to use the various time functions, see how much farther you can get w/ your proj...

Hehehe...I'm an @$$...hahahahahhahaa....
linecode




PostPosted: Thu Jun 17, 2004 8:24 pm   Post subject: (No subject)

thats awesome, that gives me a great help what to do. thank you!
templest




PostPosted: Fri Jun 18, 2004 9:42 pm   Post subject: (No subject)

You made a compsci account just to bribe us with a gMail account... you bastard. Evil or Very Mad

How about you just be nice and give me one? Very Happy
Dan




PostPosted: Fri Jun 18, 2004 10:02 pm   Post subject: (No subject)

i have a fealing he dose not realy have any invites....

if he did u whould think he whould at least have his e-mail in his profile as @gmail Rolling Eyes
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
templest




PostPosted: Sat Jun 19, 2004 12:20 am   Post subject: (No subject)

good point, if I was him I'd only have 1 invite to give away. Laughing
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 3  [ 41 Posts ]
Goto page 1, 2, 3  Next
Jump to:   


Style:  
Search: