all tasks
This commit is contained in:
parent
b83f433714
commit
68f8f3e56b
14735 changed files with 178959 additions and 0 deletions
9
Task/Unicode-variable-names/0DESCRIPTION
Normal file
9
Task/Unicode-variable-names/0DESCRIPTION
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{{omit from|BBC BASIC}}
|
||||
# Describe, and give a pointer to documentation on your languages use of characters ''beyond'' those of the ASCII character set in the naming of variables.
|
||||
# Show how to:
|
||||
:* Set a variable with a name including the 'Δ', (delta ''character''), to 1
|
||||
:* Increment it
|
||||
:* Print its value.
|
||||
|
||||
;Cf.:
|
||||
* [[Case-sensitivity of identifiers]]
|
||||
2
Task/Unicode-variable-names/1META.yaml
Normal file
2
Task/Unicode-variable-names/1META.yaml
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
---
|
||||
note: Unicode
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
(let ((Δ 1))
|
||||
(1+ Δ))
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
with Ada.Text_IO;
|
||||
procedure main is
|
||||
Δ : Integer;
|
||||
begin
|
||||
Δ := 41;
|
||||
Δ := Δ + 1;
|
||||
Ada.Text_IO.Put_Line (Δ'Img);
|
||||
end main;
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
Δ = 1
|
||||
Δ++
|
||||
MsgBox, % Δ
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
(let ((Δ 1))
|
||||
(incf Δ))
|
||||
7
Task/Unicode-variable-names/D/unicode-variable-names.d
Normal file
7
Task/Unicode-variable-names/D/unicode-variable-names.d
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import std.stdio;
|
||||
|
||||
void main() {
|
||||
auto Δ = 1;
|
||||
Δ++;
|
||||
writeln(Δ);
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
var Δ : Integer;
|
||||
|
||||
Δ := 1;
|
||||
Inc(Δ);
|
||||
PrintLn(Δ);
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
(* Compiled with Delphi XE *)
|
||||
program UnicodeVariableName;
|
||||
|
||||
{$APPTYPE CONSOLE}
|
||||
|
||||
uses
|
||||
SysUtils;
|
||||
|
||||
var
|
||||
Δ: Integer;
|
||||
|
||||
begin
|
||||
Δ:= 1;
|
||||
Inc(Δ);
|
||||
Writeln(Δ);
|
||||
Readln;
|
||||
end.
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
variable ∆
|
||||
5 ∆ !
|
||||
∆ @ .
|
||||
9
Task/Unicode-variable-names/Go/unicode-variable-names.go
Normal file
9
Task/Unicode-variable-names/Go/unicode-variable-names.go
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
Δ := 1
|
||||
Δ++
|
||||
fmt.Println(Δ)
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
main = print ψ
|
||||
where δΔ = 1
|
||||
ψ = δΔ + 1
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
int Δ = 1;
|
||||
double π = 3.141592;
|
||||
String 你好 = "hello";
|
||||
Δ++;
|
||||
System.out.println(Δ);
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
I HAS A SRS "Δ" ITZ 1
|
||||
SRS "Δ" R SUM OF SRS ":(394)" AN 1
|
||||
VISIBLE SRS ":[GREEK CAPITAL LETTER DELTA]"
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
local unicode = {}
|
||||
unicode["Für"] = "for"
|
||||
print(unicode["Für"])
|
||||
|
||||
unicode["garçon"] = "boy"
|
||||
print(unicode["garçon"])
|
||||
|
||||
unicode["∆"]=1
|
||||
print(unicode["∆"])
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
Δ = 1;
|
||||
Δ++;
|
||||
Print[Δ]
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
/* NetRexx */
|
||||
options replace format comments java crossref symbols nobinary
|
||||
|
||||
upperΔ = 1
|
||||
Δupper = upperΔ
|
||||
lowerδ = 2
|
||||
δlower = lowerδ
|
||||
|
||||
say upperΔ '+' Δupper '= \-'
|
||||
upperΔ = upperΔ + Δupper
|
||||
say upperΔ
|
||||
|
||||
say lowerδ '+' δlower '= \-'
|
||||
lowerδ = lowerδ + δlower
|
||||
say lowerδ
|
||||
say
|
||||
|
||||
-- Unicode works with the NetRexx built-in functions
|
||||
Υππερ = '\u0391'.sequence('\u03a1') || '\u03a3'.sequence('\u03a9') -- ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩ
|
||||
Λοωερ = '\u03b1'.sequence('\u03c1') || '\u03c3'.sequence('\u03c9') -- αβγδεζηθικλμνξοπρστυφχψω
|
||||
say Υππερ'.Lower =' Υππερ.lower()
|
||||
say Λοωερ'.Upper =' Λοωερ.upper()
|
||||
say
|
||||
|
||||
-- Note: Even with unicode characters NetRexx variables are case-insensitive
|
||||
numeric digits 12
|
||||
δ = 20.0
|
||||
π = Math.PI
|
||||
θ = Π * Δ
|
||||
σ = Θ ** 2 / (Π * 4) -- == Π * (Δ / 2) ** 2
|
||||
say 'Π =' π', diameter =' δ', circumference =' Θ', area =' Σ
|
||||
|
||||
return
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
var Δ = 1
|
||||
Δ.inc()
|
||||
echo(Δ)
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
<?php
|
||||
$Δ = 1;
|
||||
++$Δ;
|
||||
echo $Δ;
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
my $Δ = 1;
|
||||
$Δ++;
|
||||
say $Δ;
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
my @ᐁ = (0, 45, 60, 90);
|
||||
|
||||
sub π { pi };
|
||||
|
||||
sub postfix:<°>($degrees) { $degrees * π / 180 };
|
||||
|
||||
for @ᐁ -> $ಠ_ಠ { say sin $ಠ_ಠ° };
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
use utf8;
|
||||
my $Δ = 1;
|
||||
$Δ++;
|
||||
print $Δ;
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
: (setq Δ 1)
|
||||
-> 1
|
||||
: Δ
|
||||
-> 1
|
||||
: (inc 'Δ)
|
||||
-> 2
|
||||
: Δ
|
||||
-> 2
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
<@ LETVARLIT>Δ|1</@>
|
||||
<@ ACTICRVAR>Δ</@>
|
||||
<@ SAYVAR>Δ</@>
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
<@ LETVARLIT>三角洲|1</@>
|
||||
<@ ACTICRVAR>三角洲</@>
|
||||
<@ SAYVAR>三角洲</@>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
>>> Δx = 1
|
||||
>>> Δx += 1
|
||||
>>> print(Δx)
|
||||
2
|
||||
>>>
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
#lang racket
|
||||
(define Δ 1)
|
||||
(set! Δ (+ Δ 1))
|
||||
(displayln Δ)
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
variable Δ
|
||||
1 !Δ
|
||||
@Δ putn
|
||||
1 +Δ
|
||||
@Δ putn
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
# -*- coding: big5 -*-
|
||||
Δ = 1
|
||||
Δ += 1
|
||||
puts Δ
|
||||
13
Task/Unicode-variable-names/Ruby/unicode-variable-names-2.rb
Normal file
13
Task/Unicode-variable-names/Ruby/unicode-variable-names-2.rb
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# -*- coding: euc-jp -*-
|
||||
|
||||
class Numeric
|
||||
def ≦(♯♭♪)
|
||||
self <= ♯♭♪
|
||||
end
|
||||
end
|
||||
|
||||
∞ = Float::INFINITY
|
||||
±5 = [-5, 5]
|
||||
p [(±5.first.≦ ∞),
|
||||
(±5.last.≦ ∞),
|
||||
(∞.≦ ∞)]
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
var Δ = 1
|
||||
val π = 3.141592
|
||||
val 你好 = "hello"
|
||||
Δ += 1
|
||||
println(Δ)
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
set Δx 1
|
||||
incr Δx
|
||||
puts [set Δx]
|
||||
Loading…
Add table
Add a link
Reference in a new issue