Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Suggestion for the Syntax section
#16
boriel Wrote:use
Code:
<zxbasic>...
listing
...</zxbasic>
This way you avoid blank lines at top and bottom in the listings.

Thanks. I think I did so. Maybe I mistyped somewhere. I did left blank lines bewteen titles and listings or paragraphs, just to make wiki markup easier to read and edit.
Reply
#17
boriel Wrote:I've already <zxbasic'ed> the examples and games listings.

I've finished the Library page, the libraries and the trigonometrical functions.
Reply
#18
boriel Wrote:This way you avoid blank lines at top and bottom in the listings.

I've just realized what you meant. First I thought you meant I was leaving a blank line between <zxbasic> and the listing. But what I'm doing is typing <zxbasic> and </zxbasic> on their own lines, because in my opinion that way the wiki source is a bit easier to read and edit. And that effectively renders an empty line! I didn't realized before.

That extra border doesn't look bad for me. Anyway the best solution would be to fix it in the extension, make it not to render that lines at the start and at the end of the block. Or maybe it could be done with CSS.only. That way the layout of the wiki source wouldn't change the final HTML.

But I can write <zxbasic> and </zxbasic> next to the code lines, no problem.
Reply
#19
I really don't mind very much, anyway. And thanks a lot :roll:
Reply
#20
Quote:I think code without line numbers should be respected


Code:
5 :
   7 REM ZX Spectrum BASIC without line numbers
   8 REM written by Zarsoft
   9 :
  10 REM init subrotines
  15 LET factorial=100:
  19 :
  20 REM ----------------------
  21 REM    test factorial
  22 REM ----------------------
  30 PRINT "max= ";:
    INPUT max:
    PRINT :
    FOR n=1 TO max:
    GO SUB factorial:
    PRINT "fact(";n;")= ";result:
    NEXT n:
    STOP :
    GO TO 10000
  95 :
100 REM ----------------------
101 REM     factorial
102 REM ----------------------
110 LET result=n:
    FOR f=n-1 TO 2 STEP -1:
    LET result=result*f:
    NEXT f:
    RETURN
999 :
Reply
#21
Sorry, I overlooked this message.
The code above is respected, but the variable "factorial" is a variable and ZX Basic (as many basics) don't resolve line numbers dynamicaly. Also there's is a missing line 10000. You should add an empty line
Code:
10000 REM
for the program to compile, and perhaps use ON GOTO to transform factorial variable into a jump table.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)