| 1 | <h2>Comments</h2> |
| 2 | <pre><code>' This is a comment |
| 3 | // This is a comment too |
| 4 | Rem This is a remark</code></pre> |
| 5 | |
| 6 | <h2>Strings</h2> |
| 7 | <pre><code>"" |
| 8 | "foo ""bar"" baz"</code></pre> |
| 9 | |
| 10 | <h2>Numbers and colors</h2> |
| 11 | <pre><code>42 |
| 12 | 3.14159 |
| 13 | 3E4 |
| 14 | &b0110 |
| 15 | &cAABBCCDD |
| 16 | &hBadFace |
| 17 | &o777 |
| 18 | &u9</code></pre> |
| 19 | |
| 20 | <h2>Example</h2> |
| 21 | <pre><code>Dim g As Graphics |
| 22 | Dim yOffSet As Integer |
| 23 | g = OpenPrinterDialog() |
| 24 | If g <> Nil Then |
| 25 | If MainDishMenu.ListIndex <> -1 Then |
| 26 | g.Bold = True |
| 27 | g.DrawString("Main Dish:",20,20) |
| 28 | g.Bold = False |
| 29 | g.DrawString(MainDishMenu.Text,100,20) |
| 30 | g.Bold = True |
| 31 | g.DrawString("Side Order:",20,40) |
| 32 | g.Bold = False |
| 33 | If FriesRadio.Value Then |
| 34 | g.DrawString(FriesRadio.Caption,100,40) |
| 35 | End If |
| 36 | If PotatoRadio.Value Then |
| 37 | g.DrawString(PotatoRadio.Caption,100,40) |
| 38 | End If |
| 39 | If OnionRingRadio.Value Then |
| 40 | g.DrawString(OnionRingRadio.Caption,100,40) |
| 41 | End If |
| 42 | yOffSet = 60 |
| 43 | If CheeseCheckBox.Value Then |
| 44 | g.Bold = True |
| 45 | g.DrawString("Extra:",20,yOffSet) |
| 46 | g.Bold = False |
| 47 | g.DrawString(CheeseCheckBox.Caption,100,yOffSet) |
| 48 | yOffSet = yOffSet + 20 |
| 49 | End If |
| 50 | If BaconCheckBox.Value Then |
| 51 | g.Bold = True |
| 52 | g.DrawString("Extra:",20,yOffSet) |
| 53 | g.Bold = False |
| 54 | g.DrawString(BaconCheckBox.Caption,100,yOffSet) |
| 55 | yOffSet = yOffSet + 20 |
| 56 | End If |
| 57 | g.Bold = True |
| 58 | g.DrawString("Notes:",20,yOffSet) |
| 59 | g.Bold = False |
| 60 | g.DrawString(NotesField.Text,100,yOffSet,(g.Width-40)) |
| 61 | End If |
| 62 | End If |
| 63 | </code></pre> |