June 2018 Update

This commit is contained in:
Ingy döt Net 2018-06-22 20:57:24 +00:00
parent ba8067c3b7
commit 22f33d4004
5278 changed files with 84726 additions and 14379 deletions

View file

@ -0,0 +1,24 @@
Function ROT13(ByVal a As String) As String
Dim i As Long
Dim n As Integer, e As Integer
ROT13 = a
For i = 1 To Len(a)
n = Asc(Mid$(a, i, 1))
Select Case n
Case 65 To 90
e = 90
n = n + 13
Case 97 To 122
e = 122
n = n + 13
Case Else
e = 255
End Select
If n > e Then
n = n - 26
End If
Mid$(ROT13, i, 1) = Chr$(n)
Next i
End Function

View file

@ -0,0 +1,4 @@
Sub Main()
Debug.Assert ROT13("abc") = "nop"
Debug.Assert ROT13("nop") = "abc"
End Sub