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,2 @@
DATA(string1) = |Test|.
DATA(string2) = string1.

View file

@ -0,0 +1,2 @@
s1 = "Hello"
s2 = s1

View file

@ -4,3 +4,15 @@
(reverse c) ; Modifies c in place.
(assert (= s c) "Strings not equal.")
; another way
; Nehal-Singhal 2018-05-25
> (setq a "abcd")
"abcd"
> (setq b a)
"abcd"
> b
"abcd"
> (= a b)
true

View file

@ -1,3 +1,3 @@
var
c = "This is a string"
d = c # Copy of content into new string
d = c # Copy c into a new string

View file

@ -1,12 +1,12 @@
my $original = 'Hello.';
my $bound-ro ::= $original;
say $bound-ro; # prints "Hello."
try {
$bound-ro = 'Runtime error!';
CATCH {
say "$!"; # prints "Cannot modify readonly value"
};
};
# y $original = 'Hello.';
#my $bound-ro ::= $original;
#say $bound-ro; # prints "Hello."
#try {
# $bound-ro = 'Runtime error!';
# CATCH {
# say "$!"; # prints "Cannot modify readonly value"
# };
#};
say $bound-ro; # prints "Hello."
$original = 'Goodbye.';
say $bound-ro; # prints "Goodbye."