HELP-phonebook in turing
Author |
Message |
helloolleh
|
Posted: Sun May 24, 2009 5:20 pm Post subject: HELP-phonebook in turing |
|
|
What is it you are trying to achieve?
I am trying to create a phonebook in turing for my assignment.
What is the problem you are having?
Unfortunately there have been some errors in my turing code, which I cannot seem to solve.
Describe what you have tried to solve this problem
I have tried many different methods which were all unsuccessful. I really need some help with creating a phonebook in turing. If anyone can give me the complete code with comments included it would be very helpful. Thanks |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Kharybdis
|
Posted: Sun May 24, 2009 5:39 pm Post subject: RE:HELP-phonebook in turing |
|
|
We're not here to provide you with your assignment on a neat little platter.
Post some code and tell us what you're struggling with. THAT, we can help with.
But write a whole assignment for you...? In one word, No.
However, i should tell you that depending on the size of the phone book, you will run into code-style specific errors.
Examples (String is limited to 250 characters, so max 250 entries, limited array size ; limited memory) |
|
|
|
|
|
Dusk Eagle
|
Posted: Sun May 24, 2009 10:47 pm Post subject: Re: HELP-phonebook in turing |
|
|
String are actually 256 (2^8) bytes long, so the max string size is 255 bytes (characters).
You mentioned some errors in your own code. So why not post that here for us to help you with? Even if one of us were to do your project for you (which ain't gonna happen, BTW), it would still be easier to start off with semi-complete code then to start from scratch. |
|
|
|
|
|
walker12101
|
Posted: Wed May 29, 2013 3:27 pm Post subject: Re: HELP-phonebook in turing |
|
|
I was wondering if someone could look at my code? it doesn't work and i need help. When the program tries to put the information that it has it over laps and doesn't input all of it.
var fnames : array 1 .. 10 of string
var lnames : array 1 .. 10 of string
var num : array 1 .. 10 of string
put "Enter 10 First Names"
for i : 1 .. 10
get fnames (i)
end for
put "Enter 10 Last Names"
for j : 1 .. 10
get lnames (j)
end for
put "Enter 10 Numbers"
for k : 1 .. 10
get num (k)
end for
delay (500)
cls
locate (1, 1)
put "First Names"
locate (1, 25)
put "Last Names"
locate (1, 40)
put "Phone Numbers"
locate (2, 1)
put "----------------------------------------------------------------------"
put ""
locate (4, 1)
for i : 1 .. 10
put fnames (i)
end for
locate (4, 25)
for j : 1 .. 10
put lnames (j)
end for
locate (4, 40)
for k : 1 .. 10
put num (k)
end for |
|
|
|
|
|
andrew.
|
Posted: Wed May 29, 2013 5:16 pm Post subject: RE:HELP-phonebook in turing |
|
|
The reason you're not seeing all your output is because in Turing, when you put text to the same line, it will overwrite anything previously there. So even if you put new text to the same line but in different columns, it will still erase the line.
There are 2 ways around this: You can either put together the full line in code and then output it, or you can use another method of printing to the screen such as Font.Draw. |
|
|
|
|
|
|
|