Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

Test irule #2

tcl

set titi 2
set tata 5

if {! ($titi == 2) ||! ($tata == 5) } {
    puts "rejet" 
} else {
    puts "ok"
}


set static "O=BOUYGUES TELECOM CN=miamitools-stb.flex.bouyguesbox.fr"
set org "O=BOUYGUES TELECOM"
set common "CN=miamitools-stb.flex.bouyguesbox.fr"

#if {! ($org contains $static) ||! ($common contains $static) } {
#    puts "rejet certif" 
#} else {
#    puts "certif ok"
#}

smule

tcl

set args "hai https://www.smule.com/p/1578485488_2356295470} 12"

#bind pub -|- * smule_title
package require http

regsub -nocase -all { } $args "+" text
regsub -nocase -all {https} $args "http" text
puts $text
regexp -line -- {http(.*)+} $text smules(url)
puts "$smules(url)"
regsub -nocase -all {\}} $smules(url) "+" smule(url)
puts "$smule(url)"

http::config -useragent mozilla
set urltok [http::geturl $smule(url) -timeout 20000]
set smule(rpage) [http::data $urltok]
http::cleanup $urltok

regsub -nocase -all (<b>|</b>|\t|<i>|</i>) $smule(rpage) "" rpage

regexp -line -- {<title>(.*)</title>} $rpage -> smule(title)
regsub -nocase -all "  " $smule(title) " " smule(title)
puts $smule(title)

proc smule_title { nick uhost hand chan args} {

if {[string match -nocase "*No Videos found*" $rpage] || ![info exists ip(as)]} {puthelp "privmsg $chan :we are have error gateway!! sorry."} else {
puthelp "privmsg $chan :$smule(title)"}

}

test12345

tcl

puts "Hello World!" 

Execute Tcl Online

tcl

#gets stdin cha
#gets stdin num
#for {set i 0} {$i<$num} {incr i} {
 #   puts "$cha"
#}


#set a 1
#while {$a} {
 #gets stdin nu
 #if {$nu<10} {
  #   puts "$nu"
 #} else {set a 0}

#}

#set a 1
#while {$a} {
#    gets stdin n
 #   if {$n != 0} {
  #      for {set i 0} {$i<$n} {incr i} {
   #      puts "*"
    #    }
    #} else {set a 0}
#}


#gets stdin n
#for {set i 0} {$i<$n} {incr i} {
 #for {set j 0} {$j<$n} {incr j} {
  #   puts -nonewline "*"
 #}
 #puts ""
#}

#gets stdin m
#for {set i 1} {$i<11} {incr i} {
 #   puts "[expr {$i*$m}]"
#}


set n 0
set nu 1
set y($n) [gets stdin]
set y($nu) [gets stdin]
set x($n) [gets stdin]
set x($nu) [gets stdin]
puts "$x(1)"
if {$x(1)>$y(1)} {
  puts "h"
 # set a [expr {{$x(1)+60}-$y(1)}]
  #set b [expr {{$x(0)-1}-$y(0)}]
  }
 # puts -nonewline " $b $a"
    




 

assde

tcl

puts "Hello World!"
set z [expr 32*1024]
puts $z
proc prod {a b} {
    return [expr $a*$b]
    
}
set s [prod 3 2]
puts "s=$s"
puts [prod 3 4]
set s [expr { $s+1 } ]
puts "s+1=$s"

sdfasdfasdf

tcl

#!/usr/bin/tclsh

for {set i 0} {$i<[gets stdin]} {incr i} {
set var {orange blue red green}
set var [linsert  $var 3 black white]
puts $i
}

hello world

tcl

puts "Hello World!"

Execute Tcl Online

tcl

set a "two words"
set b $a
puts $a


puts "Hello, World !"
set a 22

set b 33

puts [expr $a+$b]


set b 5 
expr [expr $b-3]

set A(1,1) 10
set A(1,2) 11
array names A



proc proc_name {formal parameters} {

statement 1
statement 2
.
.
return 
}










proc proc_a {} {
    

    set c "C insode proc_a"



puts $c

return

}






proc plus  { a,b } {
    
    
    expr $a+$b
    return
    
    
}
    
proc proc_a {a,b,c} {body of procedure}

return 

    
}


proc proc_b b {body of procedure}{

return 
}

proc proc_a {} {
    
    set c "C incide proc_a"
    puts $c
    return
    
}

proc proc_b {} {
    
    set c "C incide proc_b"
    

puts $c 

set c "C Outside proc_a and proc_b"

proc_a 
proc_b

puts $c


return 

}









RUSTY

tcl

#!/usr/bin/tclsh

set a 21
set b 10
set c [expr $a + $b]
puts "Line 1 - Value of c is $c\n"
set c [expr $a - $b]
puts "Line 2 - Value of c is $c\n"
set c [expr $a * $b]
puts "Line 3 - Value of c is $c\n"
set c [expr $a / $b]
puts "Line 4 - Value of c is $c\n"
set c [expr $a % $b]
puts "Line 5 - Value of c is $c\n"

Execute Tcl Online

tcl

set a 10
puts "10"

Previous 1 ... 3 4 5 6 7 8 9 ... 17 Next
Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.