I have a very simple question. What is the right standard convention to use for declaring arrays?I understand that for a simple declaration of a variable as an integer, this is the convention:DECLARE myVar : INTEGERWhat about for an integer array of 10 elements?DECLARE myVar : ARRAY[1,10] of INTorDECLARE myVar[1,10] : ARRAY of INTor something else?
the convention for declaring arrays in pseudocode
arrays
Pseudocode is not a formal language. Declare your arrays however you want, as long as it's obvious what you mean. Including the full limits (as you have in both your array examples) is good, since it means the reader isn't worrying about whether you start your indices at 0 or 1.