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

Username:   Password: 
 RegisterRegister   
 "Do you want to leave a message?"
Index -> Programming, Turing -> Turing Submissions
Goto page 1, 2  Next
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
templest




PostPosted: Thu Jul 29, 2004 5:18 pm   Post subject: "Do you want to leave a message?"

I hate looking for pens/paper when someone calls and they wnat to leave a message to a sibling that isn't home. So I wrote this quick mofo' to jot down quick notes when someone calls, stores the name / message and the number in which to contact them.

I know I don't need the arrays, and I could probably store the numbers and names on the same string, but I did it seperatly and in arrays because I want to give people a small challenge.

This is the basic code for processing the info', I want someone to write the esthetics, ie: GUI. Wink

Whoever write's the most badass interface get's 25 bits.

code:
proc add (name, number : string)
    var dummy_buffer : string
    var file : int
    open : file, "book.ini", get, put, mod
    loop
        exit when eof (file)
        get : file, dummy_buffer : *
    end loop
    put : file, name
    put : file, number
    close (file)
end add

proc gets
    var file : int
    var numb : int := 0
    var count_buffer : string
    open : file, "book.ini", get
    loop
        exit when eof (file)
        get : file, count_buffer : *
        get : file, count_buffer : *
        numb := numb + 1
    end loop
    close (file)
    var users : array 1 .. numb of string
    var numbr : array 1 .. numb of string
    open : file, "book.ini", get
    for i : 1 .. numb
        get : file, users (i) : *
        get : file, numbr (i) : *
        put users (i) /* comment out this line if you're making a GUI */
        put "" : 10, numbr (i) : 6 /* as well as this one*/
    end for
    close (file)
end gets

var input, name, number : string
loop
    put ">> " ..
    get input : *
    if length (input) = 4 and input = ".add" then
        put "name: " ..
        get name : *
        put "number: " ..
        get number : *
        add (name, number)
    elsif length (input) = 5 and input = ".dump" then
        gets
    elsif input = "quit" then
        quit
    end if
end loop
Sponsor
Sponsor
Sponsor
sponsor
templest




PostPosted: Thu Jul 29, 2004 6:53 pm   Post subject: (No subject)

someone move this thread to the "contests" section. Wink
Kingnoz




PostPosted: Fri Jul 30, 2004 2:52 pm   Post subject: (No subject)

Here you go templest. This is the cheap message program for you...can only hold 40 messages...if anyone wants to extend on it go ahead.


Message.t
 Description:

Download
 Filename:  Message.t
 Filesize:  3.45 KB
 Downloaded:  178 Time(s)


book.txt
 Description:

Download
 Filename:  book.txt
 Filesize:  0 Bytes
 Downloaded:  109 Time(s)

templest




PostPosted: Thu Aug 05, 2004 7:25 pm   Post subject: (No subject)

I don't get it... all it does it display what's inside the text file? What happened to adding to the text file from within the program? Razz
Kingnoz




PostPosted: Thu Aug 05, 2004 11:20 pm   Post subject: (No subject)

You really didn't try it fully did u...

If you would click file, new message then there would be a popup window.
Inside this magical window you can put a name/message/whatever and number then click add message and POOF it is added to the text file.
Now click cancel and it closes the popup. Then go to file and click open message and then it has a listing of the all the messages. Click a message button and u can see ur message.


You really need to try the program before posting a stupid comment...

Quote:
I don't get it... all it does it display what's inside the text file? What happened to adding to the text file from within the program?
rizzix




PostPosted: Fri Aug 06, 2004 11:03 pm   Post subject: (No subject)

Kingnoz wrote:

You really need to try the program before posting a stupid comment...
Quote:
I don't get it... all it does it display what's inside the text file? What happened to adding to the text file from within the program?


dont need to be rude Smile
this_guy




PostPosted: Sun Aug 08, 2004 9:57 am   Post subject: (No subject)

stupid *$*@# crashed my comp...

really wished some1 wud tell me where 4.05 is
DanShadow




PostPosted: Sun Aug 08, 2004 9:41 pm   Post subject: (No subject)

Well....you could always try http://holtsoft.com Thats where I found it awile ago.
Sponsor
Sponsor
Sponsor
sponsor
Kingnoz




PostPosted: Mon Aug 09, 2004 11:21 pm   Post subject: (No subject)

this_guy wrote:
stupid *$*@# crashed my comp...

really wished some1 wud tell me where 4.05 is



I didn't do this in 4.05, so that shouldn't be an issue for you.
beard0




PostPosted: Tue Aug 10, 2004 10:24 am   Post subject: (No subject)

Here's my nice little Phone Messager interface, using templest's storing system.


MessageTaker.zip
 Description:

Download
 Filename:  MessageTaker.zip
 Filesize:  7.42 KB
 Downloaded:  146 Time(s)

beard0




PostPosted: Fri Aug 20, 2004 12:42 pm   Post subject: (No subject)

Hey templest!
When's the deadline for your contest? Are we allowed to add features? (i.e. delete an old message)
templest




PostPosted: Sun Aug 22, 2004 10:06 pm   Post subject: (No subject)

Go right ahead... since yours seems to be the only submission thus far, I'm trying to give people a chance. Smile

Tell you what, the winning submission gets bonus bits for every aded feature. Basically, write a kick-ass "Message Taker" branching off from the code that I provided. (10 bits for every feature, significant features ie: deleting messages Wink )

EDIT: Very nice by the way. Very Happy
zomg




PostPosted: Thu Oct 14, 2004 10:50 am   Post subject: (No subject)

lol i love it... ive used it like 3 times lol keep up the good work
timmytheturtle




PostPosted: Fri Oct 15, 2004 3:19 pm   Post subject: (No subject)

seems like a good idea for a program, but I find it easier to use notepad
Hikaru79




PostPosted: Sun Oct 17, 2004 12:19 am   Post subject: (No subject)

this_guy wrote:
stupid *$*@# crashed my comp...

really wished some1 wud tell me where 4.05 is


Check the thread in "Programming News" called "Turing 4.0.5." On page 6 there's a link where someone posted it. Enjoy Smile
Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

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


Style:  
Search: