Computer Science Canada Programming C, C++, Java, PHP, Ruby, Turing, VB   Username:   Password: Wiki   Blog   Search   Turing   Chat Room  Members
TIMER..... I was bored
Author Message
Boarder16

Posted: Wed Feb 25, 2004 11:04 pm   Post subject: TIMER..... I was bored

This is a timer i made.. it had a reset and counts seconds,minutes,hours,days, but i haven't ran it long enough to see hours or days work lol... bits would be appreciated for my hard programmign work and skill lol 8) 8)

 code: import GUI var n2, n1, n3, n, nm, nm2, d1, d2 : int n := 0 n2 := 0 n1 := 0 n3 := 0 nm := 0 nm2 := 0 d1 := 0 d2 := 0 proc reset     n := 0     n2 := 0     n1 := 0     n3 := 0     nm := 0     nm2 := 0     d1 := 0     d2 := 0 end reset proc timer     loop         cls         var res : int := GUI.CreateButtonFull (38, 300, 0, "Reset",             reset, 0, '^R', true)         put d2, d1, " : ", n, n1, " : ", nm2, nm, " : ", n2, n3         put " d :  h :  m :  s"         put " a :  r :  i :  e"         put " y :  s :  n :  c"         delay (1000)         n3 := n3 + 1         if n3 = 10 then             n3 := 0             n2 := n2 + 1         else         end if         if n3 = 0 and n2 = 6 then             n3 := 0             n2 := 0             nm := nm + 1         else         end if         if nm = 10 then             nm := 0             nm2 := nm2 + 1         else         end if         if nm = 0 and nm2 = 6 then             nm := 0             nm2 := 0             n1 := n1 + 1         else         end if         if n1 = 10 then             n1 := 0             n := n + 1         else         end if         if n1 = 4 and n = 2 then             n1 := 0             n := 0             d1 := 0         else         end if         if d1 = 10 then             d1 := 0             d2 := d2 + 1         else         end if     end loop end timer process btnact     loop         exit when GUI.ProcessEvent     end loop end btnact fork btnact timer

Cervantes

Posted: Thu Feb 26, 2004 6:34 pm   Post subject: (No subject)

Have you seen Zylum's clock?
It tells the real time and looks like a clock. check it out here
apomb

Posted: Fri Feb 27, 2004 10:51 am   Post subject: (No subject)

nice!
i like how you integrated GUI into a seemingly boring program
the_short1

Posted: Sun Feb 29, 2004 8:00 pm   Post subject: (No subject)

..waht we make when us computer programer are bored... nice...

umm you have 8 lines of wasted code tho...

setting all variables to =0 at start/// can be done easier...

just insert line: 'reset' after you declare the procedure reset... shave off 7 liens of code...

just thought i would mention that,,,
jonos

Posted: Sun Feb 29, 2004 8:39 pm   Post subject: (No subject)

that's pretty cool. nice use of gui. you should get it to correspond with the real time and have the timer as a secondary thing. like make a digital watch in turing with alarm clock, clock, stop watch, and all that stuff for the computer.
the_short1

Posted: Sun Feb 29, 2004 9:23 pm   Post subject: (No subject)

i wont plug with a link... only saying i made myself a timer for minutes with a loud beeping noise... cuz i say" ill be up in 5 mins" and it turns into 5 hours... jk

your should add a beeping TIMEr to urs.. that would be cool..
valor

Posted: Wed Mar 10, 2004 12:09 pm   Post subject: cool

i think it is nice, although i am just a turing noobie i am impressed by little things. that i cannot make yet
jonos

Posted: Wed Mar 10, 2004 12:36 pm   Post subject: (No subject)

if you learn from compsci and turing reference, you will learn way more than what you learn in class, unless youve got an awesome compsci teacher who loves their job.

valor

Posted: Thu Mar 11, 2004 11:00 am   Post subject: (No subject)

i am taking compsci at my school and im just starting to learn about algorithm's (i think thats how you spell it :p ) i am enjoying it and my teacher likes me. and i was wondering where i can find some tutorials or something to help me out.

i would appreciate any help
Paul

Posted: Thu Mar 11, 2004 5:07 pm   Post subject: (No subject)

you might find them in the Turing Tutorials section here
http://www.compsci.ca/v2/viewforum.php?f=3
and since if you didn't see it, you prolly didn't access this from the index either, which is here:
http://www.compsci.ca/v2/index.php
zylum

Posted: Thu Mar 11, 2004 7:15 pm   Post subject: (No subject)

thats a good begginer program. lol, but why did you even bother with days and hours lmao, it's not like anyone is going to leave it running for more than a minute

anyways, good job

-zylum
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First

Page 1 of 1  [ 11 Posts ]
 Jump to:  Select a forum  CompSci.ca ------------ - Network News - General Discussion     General Forums   -----------------   - Hello World   - Featured Poll   - Contests     Contest Forums   -----------------   - DWITE   - [FP] Contest 2006/2008   - [FP] 2005/2006 Archive   - [FP] 2004/2005 Archive   - Off Topic     Lounges   ---------   - User Lounge   - VIP Lounge     Programming -------------- - General Programming     General Programming Forums   --------------------------------   - Functional Programming   - Logical Programming   - C     C   --   - C Help   - C Tutorials   - C Submissions   - C++     C++   ----   - C++ Help   - C++ Tutorials   - C++ Submissions   - Java     Java   -----   - Java Help   - Java Tutorials   - Java Submissions   - Ruby     Ruby   -----   - Ruby Help   - Ruby Tutorials   - Ruby Submissions   - Turing     Turing   --------   - Turing Help   - Turing Tutorials   - Turing Submissions   - PHP     PHP   ----   - PHP Help   - PHP Tutorials   - PHP Submissions   - Python     Python   --------   - Python Help   - Python Tutorials   - Python Submissions   - Visual Basic and Other Basics     VB   ---   - Visual Basic Help   - Visual Basic Tutorials   - Visual Basic Submissions     Education ----------- - Student Life   Graphics and Design ----------------------- - Web Design     Web Design Forums   ---------------------   - (X)HTML Help   - (X)HTML Tutorials   - Flash MX Help   - Flash MX Tutorials   - Graphics     Graphics Forums   ------------------   - Photoshop Tutorials   - The Showroom   - 2D Graphics   - 3D Graphics     Teams ------ - dTeam Public

 Style: Appalachia blueSilver eMJay subAppalachia subBlue subCanvas subEmjay subGrey subSilver subVereor Search: