Typewriter font in wiki

Still struggling

by Stefaan Plets -
Number of replies: 0

Still trying to get my code fragments in a typewriter font...  I seem to get the best results with the <pre> tag...  With <code> tags, like this:

<code>Private Sub cmdSom3Getallen_Click()
'
'declaratie van variabelen
Dim intGetal1 As Integer
Dim intGetal2 As Integer
Dim intGetal3 As Integer
Dim intSom As Integer
'
intGetal1 = InputBox("Eerste getal:", "Invoer eerste getal")
intGetal2 = InputBox("Tweede getal:", "Invoer tweede getal")
intGetal3 = InputBox("Derde getal:", "Invoer derde getal")
'
'berekeningen
intSom = intGetal1 + intGetal2 + intGetal3
'
'uitvoer
txtSom = intSom</code>

I get this output:

Private Sub cmdSom3Getallen_Click() ' 'declaratie van variabelen Dim intGetal1 As Integer Dim intGetal2 As Integer Dim intGetal3 As Integer Dim intSom As Integer ' intGetal1 = InputBox("Eerste getal:", "Invoer eerste getal") intGetal2 = InputBox("Tweede getal:", "Invoer tweede getal") intGetal3 = InputBox("Derde getal:", "Invoer derde getal") ' 'berekeningen intSom = intGetal1 + intGetal2 + intGetal3 ' 'uitvoer txtSom = intSom

With the <pre> tag, all lines are put under each other, but I cannot leave any blank lines, so I have to put comment signs (quotes) in them.

With the == markup, I have to put == signs around each line...

Basically, what I'd like, is a tag (or some markup) that leaves the fragment between the opening and the closing tag untouched (and preferably displayed with a non-proportional font). 

I used the MoinMoin wiki for a while, and there it was possible to put {{{ }}} around code fragments.  These fragments where left untouched, displayed in a typewriter font, with a light background color.  That worked very nicely... but now I'd like to transfer all of our tools to Moodle.

I use "Safe HTML" in my Wiki, since I don't want my pupils to mess around with the layout too much.

Any ideas, someone???

Thanks a lot.

Stefaan