Jump to content

Computer Science Pseudocode conventions


ijens10

Recommended Posts

Good Afternoon/Morning Computer Science Students,

Hopefully everyone is enjoying their weekend.....

Just a question regarding the pseudocode conventions (Topic 4) surrounding switch-cases. I have had a look at the IB Comp Sci guide and "Approved Notation for Developing Pseudocode" and have not found anything regarding it. Does anyone know if we can use switch-cases in pseudocode? If not, maybe I'll just have to go back to if, else if, else if, else if, else. Oh well.

 

Thank you very much in advance.

 

Link to post
Share on other sites

  • 1 month later...
On 3/13/2020 at 10:22 PM, ijens10 said:

Good Afternoon/Morning Computer Science Students,

Hopefully everyone is enjoying their weekend.....

Just a question regarding the pseudocode conventions (Topic 4) surrounding switch-cases. I have had a look at the IB Comp Sci guide and "Approved Notation for Developing Pseudocode" and have not found anything regarding it. Does anyone know if we can use switch-cases in pseudocode? If not, maybe I'll just have to go back to if, else if, else if, else if, else. Oh well.

Thank you very much in advance.

It's been a while since I did IB but I'm doing a degree in comp sci. and I can say that switch statements should be absolutely valid pseudo-code. Fundamentally switch statements actually represented a different thing than if-else originally, although modern compilers probably are smart enough to make that not matter. 

Link to post
Share on other sites

37 minutes ago, Nomenclature said:

It's been a while since I did IB but I'm doing a degree in comp sci. and I can say that switch statements should be absolutely valid pseudo-code. Fundamentally switch statements actually represented a different thing than if-else originally, although modern compilers probably are smart enough to make that not matter. 

I agree. They are quite different in their uses, applications and efficiencies which is why I found it strange there was no mention of them.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...