First of all: My English is bad so please forgive me.
For 35 years ago I had a BBC model B. I programmed in BBC BASIC, 6205 assembler, comal and ansi pascal. In 1987 because of my job then I had to use a Danish programming language UNICOMAL. UNICOMAL was in many ways as BBCBASIC, but with a strict syntax check for each line and some automatic e.g. adding THEN if you for forget.
Recently I started to program again and it is a joy. I have read that Python should be easy to learn and it is. I even learned OOP in Python and relatively easy to learn. The syntax can be frustrating and can sometimes be strange for me.
A for loop from 0 to 2, therefore running 3 times: you write for x in range(0, 3): CASE instead of WHEN (why) and each case normally and with break (reminds me of GOTO). I could get used to use Python syntax, but graphics is very hard and Windows API is also hard to use.
Then I tried C++ and wrote some test programs. I understand to some degree, why C and C++ is so fast - closer to assembler. I actually like C++ and syntax is for the most part easy to grasp. I particularly like the clean code, that is not compressed. Again Windows API is also hard to use.
BBC BASIC my old love had survived to this day. Russell have done tremendously work and I really don't have to use the Windows API, but he had made Windows accessible via SYS. Back in the eighties I also wrote very compact code and thought is was fine.
Today I wish more clear and readable code. I think it is because of UNICOMAL and C++
I don't want step on any toes, but please let me know what you think.
Code: Select all
10 REM suggestions: indentions and comments // UNICOMAL and C++ comments style 20 30 PROC dummy(TRUE) // use tabs or spaces to comment coloum 40 PRINT FN_function(2,1) 50 END 60 70 DEFPROC dummy(indention) 80 CASE indention OF // #1: Indention in procedures 90 WHEN TRUE 100 IF indention THEN // #3: Comment on every line 110 PRINT "Indention #1" 120 PRINT "Indention #2" 130 PRINT "Indention #3" 140 ENDIF 150 WHEN FALSE 160 IF 1>2 THEN 170 PRINT "Indention #4" 180 PRINT "Indention #5" 190 PRINT "Indention #6" 200 ENDIF 210 OTHERWISE 220 NULL 230 ENDCASE 240 ENDPROC dummy 250 260 DEF FN function(a, b) // #2: Indention in functions 270 IF a>b THEN 280 =a/b // #5: =a/b or RETURN a/b 290 ELSE 300 =a+b 310 ENDIF 320 ENDFUNC // #4: easy to read