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

Username:   Password: 
 RegisterRegister   
 List's Help
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
the_scott_mans




PostPosted: Wed Apr 02, 2003 9:01 pm   Post subject: List's Help

well i am getting so confused and i am going crazy and don't know what to do. How is it that i go about using a list and enter in the selection and the selection has values (PRICES FOR CASH REGISTER) after entering in the selection and pressing enter it adds it up and adds on the tax.

EX. here is an example about how my list is spaced out and they have headings. the there is items under the headings which are the ones that i want to have the values and be able to select.

put "" : 14, "Electronics"
put "" : 14, "*************"
put ""
put ""
put "" : 14, "Xbox"
put "" : 14, "1.Games"
put "" : 14, "2.Controllers"
put ""
put ""
put "" : 14, "PS2"
put "" : 14, "3.Games"
put "" : 14, "4.Controller"
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Wed Apr 02, 2003 9:04 pm   Post subject: (No subject)

just ask the user for the price... it would be easiest to do this way...

think of the real cash regestry... instead of typing it in, they just scan the bar code... which basically is the same thing.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
the_scott_mans




PostPosted: Wed Apr 02, 2003 9:09 pm   Post subject: (No subject)

Ya but i am not using it to scan a barcode i want it almost like a data base where you select the things and it adds it up
Asok




PostPosted: Wed Apr 02, 2003 9:14 pm   Post subject: (No subject)

if you're making a db, you may as well make 2 arrays, one array for the name, and the other array for the prices (corosponding arrays of course)
the_scott_mans




PostPosted: Wed Apr 02, 2003 9:16 pm   Post subject: (No subject)

How do i make them interact
Tony




PostPosted: Wed Apr 02, 2003 9:52 pm   Post subject: (No subject)

well you enter a name, then you search though the name array to find which item data it is.

say i entered "wacom" and it turns out to be the name stored in array_name(5)

#5 if your item number. you use that number to get the price from the second array

put array_price(5)
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
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 1  [ 6 Posts ]
Jump to:   


Style:  
Search: