Sub Codes Ciphers Class

MorseCodeEncodeSample

Signature (Visual Basic / VBA)

Private Sub MorseCodeEncodeSample()
    ' Print the characters which are supported with a Morse representation.

    Dim intCurAsc As Integer
    For intCurAsc = 0 To 255
        Dim strANSI As String
        strANSI = Chr$(intCurAsc)

        Dim strMorse As String
        strMorse = MorseCodeEncode(strANSI)

        If Len(strMorse) Then
            Debug.Print IllustrateValue(strANSI) & " --> " & strMorse
        End If
    Next intCurAsc
End Sub