4 Replies - 448 Views - Last Post: 16 July 2020 - 03:48 PM Rate Topic: -----

#1 imgroovy   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 01-June 20

c# noob. Pseudocode in c#?

Posted 01 June 2020 - 06:16 AM

Is there a way to Pseudocode in C#? I need to develop a one-to-many file and folder transfer and was wondering if I should begin by pseudocode prior to coding.
Is This A Good Question/Topic? 0
  • +

Replies To: c# noob. Pseudocode in c#?

#2 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 15790
  • View blog
  • Posts: 63,276
  • Joined: 12-June 08

Re: c# noob. Pseudocode in c#?

Posted 01 June 2020 - 06:29 AM

That's the whole concept of 'pseudo code' is that it is a generalized form of coding. So yes, you can write your notes in as strict, or as least strict, to a given programming language, and then refine that with actual syntax.
Was This Post Helpful? 1
  • +
  • -

#3 DarenR   User is offline

  • D.I.C Lover

Reputation: 707
  • View blog
  • Posts: 4,569
  • Joined: 12-January 10

Re: c# noob. Pseudocode in c#?

Posted 01 June 2020 - 08:39 AM

pseudo code is just a made up coding direction. it can be as complicated as you want or as simple as you want.
start
get a number
return number
do something with number
end


get Int from user
declare variables to use for user
create methods add, subtract, divide, multiply
use integers in methods
foreach int do soemthing
and so on


Was This Post Helpful? 0
  • +
  • -

#4 KeyWiz   User is offline

  • D.I.C Regular
  • member icon

Reputation: 14
  • View blog
  • Posts: 454
  • Joined: 26-October 06

Re: c# noob. Pseudocode in c#?

Posted 16 July 2020 - 03:10 PM

View Postimgroovy, on 01 June 2020 - 07:16 AM, said:

Is there a way to Pseudocode in C#? I need to develop a one-to-many file and folder transfer and was wondering if I should begin by pseudocode prior to coding.

Pseudo means Fake, so Pseudocode is Fake Code. It really does not matter which language you are targeting when you create your Pcode. Pcode is simply a means to help you structure your program before you begin coding. Pcode can be as simple or as complex as you like, although creating pcode at the same level of creating the code itself seems counter productive. Instead, think of Pcode as the textual version of a flowchart. For instance; say you are going to build a media player.

Your Pseudocode would look something like this:
Show Splashscreen
allow file selection
create play button
create stop button
create fast forward button
create last song button
...
OR;
Show Splashscreen image of Player
Create File Open Dialog, call it Find Song
Create stream reader to read file into memory
...
OR;
For 1 to 10
print value
play song
Next

the point I am attempting to stress here is that Pseudocode is whatever you want it to be, but it should give yourself and any other programmers working on your project an idea of what it is you are attempting to accomplish. It is a SIMPLE road map of what you are attempting to do. If you want something more complex than Pseudocode, then you would use a Flow Chart showing the names of processes you plan on building and the branching the program makes as it progresses. Then using the flow chart and/or the Pseudocode you can structure where your project is in relation from the beginning to the completion.

If you are using Pseudocode for a class assignment, think in general terms of programming. Setting Values, Checking True, Branching, and Processing. I hope this helps.

This post has been edited by KeyWiz: 16 July 2020 - 04:51 PM

Was This Post Helpful? 0
  • +
  • -

#5 Skydiver   User is offline

  • Code herder
  • member icon

Reputation: 7447
  • View blog
  • Posts: 25,085
  • Joined: 05-May 12

Re: c# noob. Pseudocode in c#?

Posted 16 July 2020 - 03:48 PM

As a quick aside, don't use the term Pcode as a substitute for pseudo-code. P-code is often used to refer to an intermediate language often generated by compilers or interpreters from a high level language, but not quite as low level as the machine language targeted for a specific CPU.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1