Page 2 of 2

Re: Suggestion for the Syntax section

PostPosted: Sun Jun 20, 2010 4:13 pm
by programandala.net
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.

Re: Suggestion for the Syntax section

PostPosted: Sun Jun 20, 2010 4:15 pm
by programandala.net
boriel wrote:I've already <zxbasic'ed> the examples and games listings.


I've finished the Library page, the libraries and the trigonometrical functions.

Re: Suggestion for the Syntax section

PostPosted: Sun Jun 20, 2010 5:46 pm
by programandala.net
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.

Re: Suggestion for the Syntax section

PostPosted: Sun Jun 20, 2010 8:32 pm
by boriel
I really don't mind very much, anyway. And thanks a lot :roll:

Re: Suggestion for the Syntax section

PostPosted: Wed Jan 08, 2014 12:11 am
by zarsoft
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 :