Przykłady kodów

Autor tego wpisu: Tomasz Masier czwartek, 28 Kwiecień, 2011
Czytaj dalszą część tego wpisu »

Kod bash:


#!/bin/bash
#Define bash global variable
#This variable is global and can be used anywhere in this bash script
VAR="global variable"
function bash {
#Define bash local variable
#This variable is local to bash function only
local VAR="local variable"
echo $VAR
}
echo $VAR
bash
# Note the bash global variable did not change
# "local" is bash reserved word
echo $VAR

Kod Perl:


#!/usr/local/bin/perl
#
# Ten program oczywiście
#
print 'Witaj świecie.'; # wyświetla komunikat</span>

http://en.support.wordpress.com/code/posting-source-code/


Zostaw odpowiedź



Security Code:

© 2012 nsec.pl