The Student Room Group

Scroll to see replies

Reply 80
Balistik
Function GetNextLetterGuess() As String
Dim GuessedLetter As String
Dim intIndex As Integer
intIndex = 1
GuessedLetter = InputBox("Next guess ?")
If LettersGuessedArray(intIndex) <> GuessedLetter Then
GetNextLetterGuess = GuessedLetter
LettersGuessedArray(intIndex) = GetNextLetterGuess
intIndex = intIndex + 1
Else
MsgBox ("You have already guessed this letter")

This is how i made it saved guessed letters in the lettersguessedarray.



does this code work coz i tried it out and it says ive used the letter already even when i have?
Reply 81
theory is really easy, its just the skeleton program I'm nervous about.
Reply 82
j_808
does this code work coz i tried it out and it says ive used the letter already even when i have?

It is suppose to do that :s-smilie:, tell you when you have used a letter. Well it works i think, definately worked for me.
alithegreat
Guys you arte missing the main one !!!!!
Masking the letters while the user is setting the phrase like a password


I'd like to be able to do that but as I am working in Pascal, basically dos, the best way I can think of hiding it is just to put in a load of blank lines after the phrase has been set, so that when the user comes along it isn't on screen.
Reply 84
We are allowed to use "local help" what do they mean by that?

They didnt ask us to write a separate program in the specimen - is tomorrows exam different?
Reply 85
Local help .... the editors help files maybe???
Reply 86
Apparently we are allowed to bring a dictionary in, anybody going to be doing that lol. You never know Psuedocode could be in there or algorithm lol.
Reply 87
Write some notes lightly in pencil inside it :P
Reply 88
Watch out with these remarks about cheating, you will be stoned to death here :grin:
Reply 89
Moa
We are allowed to use "local help" what do they mean by that?

They didnt ask us to write a separate program in the specimen - is tomorrows exam different?


Preliminary material says
SECTION B
You are advised to spend no more than 20 minutes on this section.
Candidates will be required to write a new program from scratch.
Questions will refer to the Preliminary Material (excluding the Skeleton Program).


So yeh tomorrows exam is different.

Hopefully this will mean the questions related to the skeleton program will be easier (or less of them).
Reply 90
Im going to try get a early night, good luck tomorrow guys i'll be looking at this forum again in the morning going to try get some last minute thorey revision
Reply 91
-the built-in functions available for manipulating string data

What do you think it is?
Reply 92
Moa
-the built-in functions available for manipulating string data

What do you think it is?


In pascal, if you have a string called say StringTest, and you assign the string The Student Room to it, StringTest[1] will return 1, StringTest[4] will return S.

I think thats what they mean. Strings can be used as arrays.
ShortRef
In pascal, if you have a string called say StringTest, and you assign the string The Student Room to it, StringTest[1] will return 1, StringTest[4] will return S.

I think thats what they mean. Strings can be used as arrays.


Wouldn't that mean StringTest[1] would return T, and StringTest[4] would return space?

I'm very nervous about this exam, I've only had about an hour per week in lessons and not much practice. :s-smilie:

I made another option for the skeleton program which read in a random line from the data file we were given and set it as the word to be guessed at and practiced fiddling and validating with the input, using ord, UpCase and so on. I hope I just know enough Pascal to pull everything off.

Everything has been fine, except I've had trouble storing guesses in an array without repeated guesses leaving a space in the array :frown:

Anyway--->

:goodluck: People!
Reply 94
Doing it tomorrow aswell. Left revision till tonight, big mistake :frown:

However my teacher give me a program with loads of ammendments adn a word doc to accmp it if anyone needs it.
Reply 95
Dont worry you are not alone :P What language are you using?
Reply 96
Visual Basic. And i cant read from a random line from "myphrases". Panic Time
Reply 97
Im trying to do this now, still working on loading a string from the file into the newphase :/

Also I still have theory revision to do.

Btw you are from the same county - which school yo go to?
Reply 98
Down High, Downpatrick. Wbu?

I can get Manchester United in, just dont know how to link the random number to the line.

Im screwed.
Reply 99
StColmans, Newry :P I can get the words in but only the first word, anything after a space is ignored ;/

Latest

Trending

Trending