Recent public codes are listed below. You can filter them by the following programming languages:
- view
- All
- Ada
- Assembler
- Assembler
- AWK (gawk)
- AWK (mawk)
- Bash
- bc
- Brainf**k
- C
- C#
- C++
- C++0x
- C99 strict
- CLIPS
- Clojure
- COBOL
- COBOL 85
- Common Lisp (clisp)
- D (dmd)
- Erlang
- F#
- Factor
- Falcon
- Forth
- Fortran
- Go
- Groovy
- Haskell
- Icon
- Intercal
- Java
- JavaScript (rhino)
- JavaScript (spidermonkey)
- Lua
- Nemerle
- Nice
- Nimrod
- Objective-C
- Ocaml
- Oz
- Pascal (fpc)
- Pascal (gpc)
- Perl
- Perl 6
- PHP
- Pike
- Prolog (gnu)
- Prolog (swi)
- Python
- Python 3
- R
- Ruby
- Scala
- Scheme (guile)
- Smalltalk
- SQL
- Tcl
- Text
- Unlambda
- VB.NET
- Whitespace
-
1 2 3 4 5
set ip "10.21.128.7(d)*" puts [regexp {[u]} $ip match b] puts $match puts $b
-
1 2 3 4 5
set ip "10.21.128.7(d)*" puts [regexp {[u*]} $ip match b] puts $match puts $b
-
1 2 3 4 5
set ip "10.21.128.7(d)*" puts [regexp {(u*)} $ip match b] puts $match puts $b
-
1 2 3 4 5
set ip "10.21.128.7(d)*" puts [regexp {[u*]} $ip match b] puts $match puts $b
-
1 2 3 4 5
set ip "10.21.128.7(u)*" puts [regexp {[u*]} $ip match b] puts $match puts $b
-
1 2 3 4 5
set ip "10.21.128.7(y)" puts [regexp {[u]} $ip match b] puts $match puts $b
-
1 2 3 4 5
set ip "10.21.128.7(u)" puts [regexp {[u]} $ip match b] puts $match puts $b
-
1 2 3 4 5 6
set ip "10.21.128.7(u)" puts [regexp {[u]} match b] puts $match puts $b [regexp {([A-Za-z]+) +([a-z]+)} $sample match sub1 sub2 ]
-
1 2 3 4
set ip "10.21.128.7(u)" puts [regexp $ip [u]] match b puts $match puts $b
-
1 2
set mylist {{one 1 2} {two 2 3} {three 3 4} {four 4 5}} echo [lsearch $mylist one]
-
1 2 3 4 5 6 7 8 9
proc example {first {second ""} args} { if {$second eq ""} { puts "There is only one argument and it is: $first" return 1 } else { if {$args eq ""} { puts "There are two arguments - $first and $second" return 2 } else {
...
-
1
print "Kode Multus"
-
1 2 3 4 5
puts "1/2 is [expr {1/2}]" puts "-1/2 is [expr {-1/2}]" puts "1/2 is [expr {1./2}]" puts "1/3 is [expr {1./3}]" puts "1/3 is [expr {double(1)/3}]"
-
1 2 3 4
set userinput {[puts DANGER!]} expr $userinput = 1 expr {$userinput = 1} puts "$userinput"
-
1 2 3 4
set userinput {[puts DANGER!]} expr $userinput == 1 expr {$userinput == 1} puts "$userinput"
-
1 2 3
set userinput {[puts DANGER!]} expr $userinput == 1 expr {$userinput == 1}
-
1 2 3 4 5 6 7 8 9
set x abc puts "A simple substitution: $x\n" set y [set x "def"] puts "Remember that set returns the new value of the variable: X: $x Y: $y\n" set z {[set x "This is a string within quotes within braces"]} puts "Note the curly braces: $z\n" puts "$x\n"
...
-
1 2 3 4 5 6 7 8 9
set x abc puts "A simple substitution: $x\n" set y [set x "def"] puts "Remember that set returns the new value of the variable: X: $x Y: $y\n" set z {[set x "This is a string within quotes within braces"]} puts "Note the curly braces: $z\n" puts $x
...
-
1 2 3 4 5 6 7 8
set x abc puts "A simple substitution: $x\n" set y [set x "def"] puts "Remember that set returns the new value of the variable: X: $x Y: $y\n" set z {[set x "This is a string within quotes within braces"]} puts "Note the curly braces: $z\n"
...
-
1 2 3 4 5 6 7 8 9
set Z Albany set Z_LABEL "The Capitol of New York is: " puts "\n................. examples of differences between \" and \{" puts "$Z_LABEL $Z" puts {$Z_LABEL $Z} puts "\n....... examples of differences in nesting \{ and \" " puts "$Z_LABEL {$Z}"
...
-
1 2 3 4 5 6 7 8 9
set Z Albany set Z_LABEL "The Capitol of New York is: " puts "\n................. examples of differences between \" and \{" puts "$Z_LABEL $Z" puts {$Z_LABEL $Z} puts "\n....... examples of differences in nesting \{ and \" " puts "$Z_LABEL {$Z}"
...
-
1
puts "haha"
-
1 2 3
set a 2 puts [expr 2^$a]
-
1 2 3
set a 2 puts [expr 2^0]
-
1 2
set a 2 puts [expr 2^1]
-
1 2 3 4 5 6 7
set a 2 for {set val 0} {$val <10} {incr val} { set nn [exp($a,$val)] puts $nn }
-
1 2 3 4 5 6 7
set a 2 for {set val 0} {$val <10} {incr val} { set nn [pow($a,$val)] puts $nn }
-
1 2 3 4 5 6 7
set a 2 for {set val 0} {$val <10} {incr val} { set nn [pow($z,$val)] puts $nn }
-
1 2 3 4 5 6 7
set a 2 for {set val 0} {$val <10} {incr val} { set nn [$a**$val] puts $nn }
-
1 2 3 4 5 6 7
set a 2 for {set val 0} {$val <10} {incr val} { set nn [a$**$val] puts $nn }


