+ 1
What is an psode code?
2 ответов
+ 6
Pseudo code is what I'm assuming you meant. It can be as simple as an English or other natural language describing what you want done. There have been some programming like language formality used, too. Here is an example of my pseudo code that I write as comments on my code.
If both are non-number strings, perform a string compare.
Otherwise, if both are numbers, perform a numeric compare. The result is negative, zero, or positive based on our instance being less, equal, or greater than the other.
Otherwise, one is a number and the other is a string so, if this instance is the string, it is greater than the number and the result should be positive.
Otherwise, this instance is a number so it is less than the string and the result should be negative.
+ 1
Thanks