Top
Back: 6.2.3 No case or switch statement
Forward: 6.2.5 Usage of brackets
FastBack: 6 Tricks and pitfalls
FastForward: Appendix A Examples
Up: 6.2 Major differences to the C programming language
Top: 1 Preface
Contents: Table of Contents
Index: F Index
About: About This Document

6.2.4 Usage of commas

In SINGULAR, a comma separates list elements and the value of a comma expression is a list. Hence, commas can not be used to combine several expressions into a single expression. For example, instead of writing

for (i=1, j=5; i<5 || j<10; i++, j++) {…} // WRONG!!!!!!

one has to write

for (i,j = 1,5; i<5 || j<10; i++, j++) {…}

Top Back: 6.2.3 No case or switch statement Forward: 6.2.5 Usage of brackets FastBack: 6 Tricks and pitfalls FastForward: Appendix A Examples Up: 6.2 Major differences to the C programming language Top: 1 Preface Contents: Table of Contents Index: F Index About: About This Document
            User manual for Singular version 2-0-4, October 2002, generated by texi2html.