--- title: "Tips and Tricks" type: "article" slug: "tips-and-tricks" url: "http://localhost/article/tips-and-tricks/" markdown_url: "http://localhost/article/tips-and-tricks.md" published_at: "2026-11-11T11:07:27+00:00" modified_at: "2026-11-11T11:07:27+00:00" featured_image: url: "http://localhost/wp-content/uploads/2022/04/20230809-041332.jpg" excerpt: "Two SuperBASIC tips taken from QL Clef: reading DATA in a REPeat loop until EOF, so no counter is needed, and putting procedure arguments in parentheses so the procedure cannot change the caller's variables. Each tip has a short example listing." post_tag: - name: "French language" slug: "french-language" taxonomy: "post_tag" url: "http://localhost/tag/french-language/" - name: "QL" slug: "ql" taxonomy: "post_tag" url: "http://localhost/tag/ql/" - name: "Superbasic (programming language)" slug: "superbasic-programming-language" taxonomy: "post_tag" url: "http://localhost/tag/superbasic-programming-language/" - name: "Tips and tricks" slug: "tips-and-tricks" taxonomy: "post_tag" url: "http://localhost/tag/tips-and-tricks/" model: - name: "Sinclair QL" slug: "sinclair-ql" taxonomy: "model" url: "http://localhost/model/sinclair-ql/" indiv: - name: "Real Gagnon" slug: "real-gagnon" taxonomy: "indiv" url: "http://localhost/indiv/real-gagnon/" publication: "QL_DOC" publication_r: id: 52925 title: "QL_DOC" type: "periodical" url: "http://localhost/periodical/ql_doc/" authors: "Réal Gagnon" issue: "5" issues_articles: - id: 76714 title: "QL_DOC n5" type: "issue" url: "http://localhost/issue/ql_doc-n5/" pages: "16" pubdate: "August-September 1988" archive_link: false volumeissue: "n5" --- # Tips and Tricks **In English:** Two SuperBASIC tips taken from QL Clef: reading DATA in a REPeat loop until EOF, so no counter is needed, and putting procedure arguments in parentheses so the procedure cannot change the caller's variables. Each tip has a short example listing. *Printed title: TRUCS & ASTUCES. The article below is in French, as printed in QL_DOC n5 (August-September 1988).* *** (SOURCE QL CLEF) Lorsqu’on lit des valeurs DATA, on peut tester la dernière valeur avec EOF, nous n’avons pas besoin de compteur ou de savoir combien il y a de DATA à lire. Exemple : ``` 10 REPeat loop 20 IF EOF: EXIT loop 30 READ a 40 PRINT a 50 END REPeat loop 100 DATA 1,2,3,4,5 110 DATA 6,7,8,9,10 ``` En appelant une PROCedure avec des arguments que l’on veut éviter de modifier en retourrnant depuis la PROCedure, on peut les entourer individuellement de paranthèses, ainsi ils seront inaltérés dans le programme principal. Exemple: ``` 10 x=10 : y=10 20 test x,(y) 25 REMark 30 PRINT x,y <--- imprimera 11 & 10 40 STOP 50 : 100 DEFine PROCedure test(x,y) 110 x=x+1 120 y=y+1 130 PRINT x,y <--- imprimera 11 & 11 140 END DEFine test ```