Page 253 - Algorithms Notes for Professionals
P. 253

Appendix A: Pseudocode



       Section A.1: Variable aectations


       You could describe variable affectation in different ways.


       Typed
       int a = 1
       int a := 1
       let int a = 1
       int a <- 1


       No type
       a = 1
       a := 1
       let a = 1
       a <- 1

       Section A.2: Functions


       As long as the function name, return statement and parameters are clear, you're fine.


       def incr n
           return n + 1


       or


       let incr(n) = n + 1

       or


       function incr (n)
           return n + 1


       are all quite clear, so you may use them. Try not to be ambiguous with a variable affectation

































       colegiohispanomexicano.net – Algorithms Notes                                                           249
   248   249   250   251   252   253