Pseudocode

 

Wikipedia : Pseudocode : Pseudocode ´Â ¾î¶² Ưº°ÇÑ ÇÁ·Î±×·¥°ú °ü·ÃµÈ Ç¥±â¸¦ »ç¿ëÇÏÁö ¾Ê°í ¾Ë°í¸®ÁòÀ» ¹¦»çÇÏ´Â »ý¼º ¹æ¹ýÀÌ´Ù. ÄÄÇ»ÅÍ °úÇÐ ±³°ú¼­´Â ¿¹Á¦ ¼Ó¿¡ pseudocode ¸¦ °¡²û »ç¿ëÇϴµ¥, ±×°ÍÀº ¶È°°Àº ÇÁ·Î±×·¥ ¾ð¾î¸¦ ¾ËÁö ¸øÇÏ´õ¶óµµ ¸ðµç ÇÁ·Î±×·¡¸Ó°¡ ÀÌÇØÇÒ ¼ö ÀÖµµ·Ï Çϱâ À§ÇÑ °ÍÀÌ´Ù.

´Ù¾çÇÑ ½ºÅ¸ÀÏÀÇ pseudocode °¡ »ç¿ëµÇ°í ÀÖ´Ù. °¡²ûÀº loop °°Àº ÈçÇÑ µ¿ÀÛÀ» À§Çؼ­ ¸¹ÀÌ ¾²ÀÌ´Â ¾ð¾î (C or Lisp) ÀÇ ¹®¹ýÀ» »ç¿ëÇϱ⵵ ÇÏ°í, ÀÚ¼¼ÇÑ °ÍÀÌ ÇÊ¿äÇÏÁö ¾Ê°Å³ª È¥¶õ½º·¯¿ï ¶§´Â ¿µ¾î ¹®ÀåÀ» »ç¿ëÇϱ⵵ ÇÑ´Ù.

¿ì¸®ÀÇ pseudocode Çü½ÄÀº ÈçÇÑ µ¿ÀÛÀ» Ç¥ÇöÇϱâ À§ÇØ C ¾ð¾îÀÇ keyword ¸¦ »ç¿ëÇÑ´Ù. Python °°Àº °ÍÀ» »ç¿ëÇÏ¿© loop °°Àº °ÍÀÇ ¿µ¿ª (scope) À» ±¸ºÐÇϱâÀ§Çؼ­ »ç¿ëÇϱ⵵ ÇÑ´Ù.

Example operations

Assignment:

<variable> = <expression>

Conditionals:

if <condition>
  do stuff
else
  do other stuff

Simple loops:

while <condition>
  do stuff

for <variable> from <first value> to <last value> by <step>
  do stuff with variable

Function calls:

<function>(<arguments>)

Function declarations:

function <function name>(<arguments>)
  do stuff with arguments
  return something (optional)

Variable declarations:

declare <variable-name> as <type>

Array declarations:

declare <array-name>[<lower-bound> to <upper-bound>] of <type>

Composite data structures (Object Oriented Programming):

struct <name_of_new_type>
  <declaration(s) of internal variables>

Accessing fields of a composite structure:

<structure variable name>.<field name>

This standard still needs work.