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

@ -1,6 +1,7 @@
import system'routines.
import system'math.
import extensions.
import extensions'text.
const Letters = "abcdefghijklmnopqrstuvwxyz".
const BigLetters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".
@ -12,16 +13,18 @@ class Encrypting :: Enumerator
object theKey.
object theEnumerator.
constructor new key:aKey text:aText
constructor key:aKey text:aText
[
theKey := aKey.
theEnumerator := aText enumerator.
]
next => theEnumerator.
bool next => theEnumerator.
reset => theEnumerator.
enumerable => theEnumerator.
get
[
var aChar := theEnumerator get.
@ -48,13 +51,13 @@ class Encrypting :: Enumerator
extension encryptOp
{
encrypt : aKey
= Encrypting new key:aKey text:self; summarize(String new).
= Encrypting key:aKey text:self; summarize(StringWriter new).
decrypt :aKey
= Encrypting new key(26 - aKey) text:self; summarize(String new).
= Encrypting key(26 - aKey) text:self; summarize(StringWriter new).
}
program =
public program =
[
console printLine("Original text :",TestText).