
Available under Creative Commons-ShareAlike 4.0 International License.
Here are some examples showing functions defined in pseudocode using our conventions as described above.
Example 6.1: pseudocode: Function with no parameter passing
Function clear monitor Pass In: nothing Direct the operating system to clear the monitor Pass Out: nothing Endfunction
Example 6.2: pseudocode: Function with parameter passing
Function delay program so you can see the monitor Pass In: integer representing tenths of a second Using the operating system delay the program Pass Out: nothing Endfunction
Example 6.3: pseudocode: Function main calling the clear monitor function
Function main Pass In: nothing Doing some lines of code Call: clear monitor Doing some lines of code Pass Out: value zero to the operating system Endfunction
- 瀏覽次數:17291