270_studysheet.xlsx - Case Statement(Selection Perl Python Ruby TCL Powershell $var = <> chomp($varvar = input var = gets.chomp set var[gets stdin]var =

270_studysheet.xlsx - Case Statement(Selection Perl Python...

This preview shows page 1 - 2 out of 4 pages.

Perl Python Ruby TCL Powershell Input $var = <>; chomp($varvar = input("") var = gets.chomp set var [gets stdin]var = read-host "" Output print " "; print (" "), print ("""…l puts " " / print " " puts "Hello World" write-host "" Variables $var , my $var var $var $var Assignment $var = value var = value var = value set var value $var = value Function Declaration Function Call funct_name(); funct_name() func_name $var1 IF statement if/elsif/else if cond:/elif cond:/elseif/elsif/else…end if/else if (cond) {}/elseid {}/else Case Statement(Selection) no no switch ($var) { } default{ while while (cond) {} while cond: ….. while cond … end while { $x < 7} while (cond) {} For loop for $x (1..100) { } Other Loop check check check, foreach na Loop Termination last break end, break break Equality/Inequality (==, != -num), (eq, ne) (>,<) (-eq)(-ne) String Concatenation (.) (+), repit(string* 3) (+) (+) Package Library instantiation package MYModule; include require include check Array Declaration (@myarray) list = [] instance -= Array.new $myarray = [] Array Refrencing $myarray[$i] list = [3], list.append(x value = instance.at(index) $value = $myArray[1] Hash Declaration %myhash = ()

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture