Is Pseudo Code a standard or whatever comes to mind?
LoopyByteloose
Posts: 12,537
Recently I have seen a lot of Pseudo Code being posted.
I realize it is a useful way of sketching out an idea, but it finally occured to me that there appears to be no real standard to this.· It might look like C or Basic or Java or whatever.
Is that true?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"When all think alike, no one is thinking very much.' - Walter Lippmann (1889-1974)
······································································ Warm regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
I realize it is a useful way of sketching out an idea, but it finally occured to me that there appears to be no real standard to this.· It might look like C or Basic or Java or whatever.
Is that true?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"When all think alike, no one is thinking very much.' - Walter Lippmann (1889-1974)
······································································ Warm regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
Comments
IF FRONT_BUMPER_HIT OR BACK_BUMPER_HIT THEN REVERSE_MOTOR_DIRECTION ENDIF
Other than the flow control language used, it bears no resemblance to a specific language, and actions taken are descriptive rather than directive (ie the exact means for performing the action is not provided). In a large company the pseudo code is provided to a various teams of software engineers to fill in the details, along with the interface (data structures, procedure arguments and returns) between sections worked on by different teams.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
1+1=10
Generally with pseudo code the author will write it vaguely resembling the language they are using (assuming it's a high level language), but there is no standard.· I suppose it depends what you are expressing and how complex it is.
When I write pesudo code however, I tend to forget about the language and just use it purely to describe basic program steps and operation.· Conditionals and loops are still the same in concept reagrdless of language so I usually express anything from asm to c++ with simple steps.· If you need to describe a more complex program which is using a class heirachy or something then I certainly wouldn't use pseudo code for this.
Personally if it's going to get pretty complicated I'd rather plan it out another way than pseudo code.· I just use this for a simple literal flowchart that resembles basic program structure/flow if you will.
So yeah, its a simple way of throwing a basic program flow sketch out, do it however you like as long as it makes sense [noparse]:)[/noparse]
Pezi
·
I didn't realsie there was ANY official standard, only what a company would define for their workers!
Learn something new everyday.
Pezi
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
1+1=10