Pseudo code

You can write pseudo code any way you want. Usually you only write pseudo code for yourself, so the only requirement here is to be able to understand what you meant when reading it later. If writing pseudo code for others to develop further you have to be more careful expressing yourself so they can understand what your half-thoughts. If they don't understand they will either implement it wrong or not complete, or perhaps they will just quote you and reply "what are you talking about?", so you have to explain more thoroughly. Pseudo code is about explaining in simple structures what the code should do, it is normally done using many of the keywords of the programming language, only much simpler. So you're not writing good English with full sentences and wide descriptions, and you're also not writing code that can be compiled and executed - but something in between.
So, a game to do with space needs a planet right?

So how do you make that and say that in pseudo?
That is the general description of the application, and has nothing to do with pseudo code. Writing pseudo code requires programming knowledge, if you don't know how to code you also can't describe how coding should be done, neither for yourself or others.
 
I've written my code, so I do understand it. I was just thinking how if I gave that to someone else, how would they get what I get, since I am the one who thought it up in the first place.
 
I've written my code, so I do understand it. I was just thinking how if I gave that to someone else, how would they get what I get, since I am the one who thought it up in the first place.

A specification or design document of some description?

Start with a diagram of your application and then describe and break it down from there.


P-code can be as detailed or as vague as you want it to be. It is one of many designed tools you can use to help you trap problems and errors in your design. It also helps you focus on the parts of the problem you don't understand yet.

The real trick to p-code is knowing where the p-code finishes and when the coding begins!
 
My gosh, everyone will soon start saying this!:D

Alright, ahhhh, you have a form in front of you. Now lets make that a game program.

So, a game to do with space needs a planet right?

So how do you make that and say that in pseudo?:rolleyes:

:confused:Understand people?

Something like:

Show form
Show planet

or

Show game form

frmGame.Maximise = true

foreach planet in the planet list
Show planet
planet.rotate()
endforeach


See? Its free form and you can mix and match descriptive lines with lines that more closely resemble code.

One thing, now that I do remember it, is that I've found after a while the language and usages in your p-code will adpat to the language you are targeting.

P-code is meant to be language independant, but there are always actions you have to perform and express in p-code that is language specific.
 
Back
Top