*************** EEVBW\EasyEx\HelloWo\   Write\   Program\
*************** HelloWo1.VBW ***************
Sub HelloWorld1()
   Selection.TypeText ("Hello World...")
End Sub
*************** HelloWo5.VBW ***************
Sub HelloWorld5()
   Selection.TypeText ("Hello World....." & vbCrLf)
   Selection.TypeText ("Hello World....." & vbCrLf)
   Selection.TypeText ("Hello World....." & vbCrLf)
   Selection.TypeText ("Hello World....." & vbCrLf)
   Selection.TypeText ("Hello World....." & vbCrLf)
End Sub
*************** HelloWo9.VBW ***************
Sub HelloWorld9()
   Dim i

   '----- LOOP
   For i = 1 To 9
      Selection.TypeText ("Hello World........." & vbCrLf)
   Next
End Sub
*************** Writ2x2.VBW ***************
Sub Write2x2()
   Selection.TypeText (2 + 2)
End Sub
*************** WritCalc.VBW ***************
Sub WriteCalc()
   Dim R
   Dim C, A

   R = 10

   C = 2 * 3.14159 * R
   A = 3.14159 * R * R

   Selection.TypeText ("Radius=" & R & vbCrLf)
   Selection.TypeText ("Circumference=" & C & vbCrLf)
   Selection.TypeText ("Area=" & A & vbCrLf)
End Sub
*************** WritMsg.VBW ***************
Sub WriteMsg()
   Dim MyMsg

   MyMsg = "- Nice weather, isn't it ?" & vbCrLf _
          & "- Yes ""nice"" weather." & vbCrLf

   Selection.TypeText (MyMsg)
End Sub
*************** Chr20_FF.VBW ***************
Sub Chr20_FF()
   Dim i

   Selection.TypeText ("***** CHARS: ")

   '----- LOOP
   For i = 32 To 255
      Selection.TypeText (Chr(i))
   Next
End Sub
*************** PrimeNb.VBW ***************
Sub PrimeNb()
   Dim IsPrimeArray(1000)
   Dim i
   Dim j, jMax

   Selection.TypeText ("***** PRIME NUMBERS: ")

   '----- LOOP 1 , On each number
   For i = 1 To 1000

      '----- Could be a prime number
      IsPrimeArray(i) = True

      j = 2
      jMax = i \ 2      '--- Int div

      '----- LOOP 2 , Search a divisor
      While IsPrimeArray(i) And (j <= jMax)
         '----- "j" can divide "i" ?
         If (i mod j) = 0 Then
            IsPrimeArray(i) = False
         End If
         j = j + 1
      Wend

      '----- Display only prime numbers
      If IsPrimeArray(i) = True Then
         Selection.TypeText (i & " ")
      End If
   Next

'
'   [<--                   i                      -->]
'    [<-- j -->]
'   .#.....................#.........................#
'    |         |                                     |
'    2      i div 2                                1000
'
End Sub
