Poređenje programskih jezika (osnovne instrukcije)

Poređenje programskih jezika (osnovna uputstva) Poređenje programskih jezika je uobičajena tema razgovora među softverskim inženjerima. Nekoliko osnovnih uputstava programskih jezika su ovde.

Konvencije ovog članka

uredi

bold je bukvalno kod. Ne-bold je tumačio čitalac. Izjave u znakovima su opcione (« … »). Tab ↹ ukazuje na neophodnu alineju (sa razmakom).

Tip identifikatora

uredi
8 bajtova (bajt) 16 bajtova (manji broj) 32 bajtova 64 bajtova (duži broj) Dužina reči Proizvoljno precizni (bignum)
Potpisano Nepotpisano Potpisano Nepotpisano Potpisano Nepotpisano Potpisano Nepotpisano Potpisano Nepotpisano
Ada[1] range -2**7 .. 2**7 - 1[j] range 0 .. 2**8 - 1[j] ili mod 2**8[k] range -2**15 .. 2**15 - 1[j] range 0 .. 2**16 - 1[j] ili mod 2**16[k] range -2**31 .. 2**31 - 1[j] range 0 .. 2**32 - 1[j] ili mod 2**32[k] range -2**63 .. 2**63 - 1[j] mod 2**64[k] Integer[j] range 0 .. 2**Integer'Size - 1[j] ili mod Integer'Veličina[k] N/D
ALGOL 68 (promenljive širine) mali int[c] N/D mali int[c] N/D int[c] N/D veliki int[c] N/D int[c] N/D veliki int [a][g]
bajtovi & bitovi
C (C99 fiksne širine) int8_t uint8_t int16_t uint16_t int32_t uint32_t int64_t uint64_t int nepotpisan int N/D
C++ (S++11) fiksne širine)
C (C99 variable-width) potpisan čađ nepotpisan čađ kratak[c] nepotpisan kratak[c] veliki[c] nepotpisan veliki[c] veliki[c] nepotpisan veliki[c]
C++ (C++11 promenljive širine)
Objective-C (Cocoa) potpisan čađ
ili
int8_t
nepotpisan čađ
ili
uint8_t
kratak
ili
int16_t
nepotpisan kratak
ili
uint16_t
int
ili
int32_t
nepotpisan int
ili
uint32_t
dugačak
ili
int64_t
nepotpisan dugačak
ili
uint64_t
NSInteger
ili
dugačak
NSUInteger
ili
nepotpisan dug
C# sbyte byte short ushort int uint long ulong IntPtr UIntPtr System.Numerics.BigInteger
(.NET 4.0)
Java byte N/D char[b] N/D N/D N/D N/D java.math.BigInteger
Gou int8 uint8 or byte int16 uint16 int32 uint32 int64 uint64 int uint big.Int
Svift Int8 UInt8 Int16 UInt16 Int32 UInt32 Int64 UInt64 Int UInt
D byte ubyte short ushort int uint long ulong N/D N/D BigInt
Common Lisp[2] bignum
Šema
ISLISP[3] bignum
Paskal (Slobodan Paskal) shortint byte smallint word longint longword int64 qword integer cardinal N/D
Vižual bejsik N/D Byte Integer N/D Long N/D N/D N/D N/D
Visual Basic .NET SByte Short UShort Integer UInteger Long ULong System.Numerics.BigInteger
(.NET 4.0)
FreeBASIC Byte or Integer<8> UByte or UInteger<8> Short or Integer<16> UShort or UInteger<16> Long or Integer<32> ULong or UInteger<32> LongInt or Integer<64> ULongInt or UInteger<64> Integer UInteger N/D
Pajton 2.x N/D N/D N/D N/D int N/D long
Python 3.x N/D N/D N/D N/D N/D int
S-Lang N/D N/D N/D N/D N/D N/D
Fortran INTEGER(KIND = n)[f] N/D INTEGER(KIND = n)[f] N/D INTEGER(KIND = n)[f] N/D INTEGER(KIND = n)[f] N/D
PHP N/D N/D int [m] N/D int [m] N/D N/D [e]
Perl 5 N/D[d] N/D[d] N/D[d] N/D[d] N/D[d] Math::BigInt
Perl 6 int8 uint8 int16 uint16 int32 uint32 int64 uint64 Int N/D
Rubi N/D N/D N/D N/D Fixnum N/D Bignum
Erlang N/D N/D N/D N/D integer() N/D integer()[o]
Skala Byte N/D Short Char[l] Int N/D Long N/D N/D N/D scala.math.BigInt
Seed7 N/D N/D N/D N/D N/D N/D integer N/D N/D N/D bigInteger
Smalltalk N/D N/D N/D N/D SmallInteger[i] N/D LargeInteger[i]
Windows PowerShell N/D N/D N/D N/D N/D N/D
OCaml N/D N/D int32 N/D int64 N/D int
or
nativeint
open Big_int;;
big_int
F Sharp sbyte byte int16 uint16 int32 or int uint32 uint64 nativeint unativeint bigint
Standard ML N/D Word8.word N/D Int32.int Word32.word Int64.int Word64.word int word LargeInt.int or
IntInf.int
Haskell (GHC) «import Int»
Int8
«import Word»
Word8
«import Int»
Int16
«import Word»
Word16
«import Int»
Int32
«import Word»
Word32
«import Int»
Int64
«import Word»
Word64
Int «import Word»
Word
Integer
Ajfel INTEGER_8 NATURAL_8 INTEGER_16 NATURAL_16 INTEGER_32 NATURAL_32 INTEGER_64 NATURAL_64 INTEGER NATURAL N/D
Kobol[h] BINARY-CHAR «SIGNED» BINARY-CHAR UNSIGNED BINARY-SHORT «SIGNED» BINARY-SHORT UNSIGNED BINARY-LONG «SIGNED» BINARY-LONG UNSIGNED BINARY-DOUBLE «SIGNED» BINARY-DOUBLE UNSIGNED N/D N/D N/D
Mathematica N/D N/D N/D N/D N/D Integer
Wolfram N/D N/D N/D N/D N/D Integer

^a standarne Standardne konstante kratko int i int dužine mogu da se koriste za određivanje koliko 'kratkih i' dugih i mogu biti korisne prefiksima za 'kratak int' i 'dug int'. Stvarna veličina 'kratkog int', 'int' i 'dugog int' je dostupna kao kratke konstante max int, max int i long max int itd.
^b Obično se koristi za znakove .
^c ALGOL 68, C i C++ jezici ne preciziraju tačnu širinu vrste celobrojnih vrednosti short, int, long, i (C99, C++11) long long, tako da su implementacije-zavisne. U C i C++ short, long, i long long tipovi se zahtevaju da budu najmanje 16, 32, i 64 bita, ali ne mogu biti veći. Tip int je potrebno da bude bar isto toliko širok kao short i najviše širok kao long, i obično širina veličine reči u procesoru mašine (npr na 32-bitnom mašinu je često 32 bita; na 64-bitnim mašinama često je na 64 bita). S99 i C++ 11 je takođe definisan sa [u]intN_t tačne širine vrste u stdint.h hederu.
^d Perl 5 nema različitih tipova. Celi brojevi, decimalni, stringovi, itd se smatraju "skalarima".
^e PHP ima dva proizvoljno-precizne biblioteke. BCMath biblioteka koristi samo stringove kao što su datatype. GMP bibliotka koristi interni "resurs" tip.
^f Vrednost "n" je obezbeđena SELECTED_INT_KIND SELECTED_INT_KIND[4] unutrašnjom funkcijom.
^g ALGOL 68Gniz opcija vremena --precision "number" e može podesiti precision long long ints do željenog "broja" značajnih cifara. Standardne konstante long long int width i long long max int mogu biti korišćene za određivanje stvarne preciznosti.
^h COBOL omogućava specifikaciju potrebne preciznosti i automatski će odabrati dostupan tip koji je sposoban da predstavlja određenu preciznost. "PIC S9999", na primer, je bio potreban za potpisavanje četiri promenljivih decimalnih cifara preciznosti. Ako je navedeno kao binarno polje, to bi se izabralo 16 bitnim tipom na većini plat formi.
^i Smalltalk automatski bira odgovarajuću zastupljenost integralnih brojeva. Tipično, dve reprezentacije su prisutne, jedna za cele brojeva se uklapa u prirodnu veličinu reč minus (SmallInteger) i jedna podržava proizvoljne veličine celih brojeva (LargeInteger). Aritmetičke operacije su podržane polimorfnim argumentima i vraćaju rezultat na najadekvatnije kompaktne reprezentacije.
^j Ada opseg proverava granične prekršaje u run-time (kao i na kompajliranju statičkih izraza). run time granica kršenja podiže "ograničenje greške" izuzetak. Opseg nije ograničen na stepenu dva. Obično predefinisani celobrojni podtipovi su:Positive (range 1 .. Integer'Last) and Natural (range 0 .. Integer'Last). Short_Short_Integer (8 bajtova), Short_Integer (16 bajtova) and Long_Integer (64 bajtova) su takođe predefinisane, ali ne zahtevaju Ada standarde. Run time čekovi se mogu isključiti ukoliko je učinak važnija od integriteta provere.
^k Adamodulo tipovi sprovode po modulu aritmetike u svim operacijama, odnosno nema mogućih kršenja dometa. Moduli nisu ograničeni na ovlašćenja dva.
^l Obično se koristi za tipove poput Java znaka.
^m intint u PHP ima istu širinu kao long type u C koju on ima na tom sistemu [c].
^n Erlang dinamički kuca. Tip identifikatora su se obično koristi za specifikaciju vrste rekordnog polja i argumenta i vraća vrste funkcija.[5]
^o Kada prelazi jednu reč.[6]

Jednostruka tačnost Dvostruka tačnost Druga tačnost Zavisni procesor
Ada[1] Float Long_Float N/D
ALGOL 68 real[a] long real[a] short real, long long real, etc.[d]
C float[b] double long double[f]
C++ (STL)
Objective-C (Cocoa) CGFloat
C# float N/D
Java
Gou float32 float64
Swift Float Double CGFloat
D float double real
Common Lisp
Šema
ISLISP
Paskal (slobodan Paskal) single double real
Visual Basic Single Double N/D
Visual Basic .NET
Xojo
Pajton N/D float
JavaScript Number[7] N/D
S-Lang
Fortran REAL(KIND = n)[c]
PHP float
Perl
Perl 6 num32 num64 Num
Rubi N/D Float N/D
Skala Float Double
Seed7 N/D float
Smalltalk Float Double
Windows PowerShell
OCaml N/D float N/D
F# float32
Standard ML N/D real
Haskell (GHC) Float Double
Ajfel REAL_32 REAL_64
KOBOL FLOAT-BINARY-7[e] FLOAT-BINARY-34[e] FLOAT-SHORT, FLOAT-LONG, FLOAT-EXTENDED
Mathematica N/D N/D Real

^a Standardne konstante real shorts i real lengths se mogu koristiti za određivanje 'short i 'long i za popravljanje 'short real' i 'long real'. Aktuelne veličine 'short real', 'real' i 'long real' su dostupne kao konstante short max real, max real i long max real etc. Sa konstantama short small real, small real i long small real dostupni su razni tipovi epsilon mašina.
^b deklaracije proste preciznosti se često ne poštuju
^c Vrednost "n" je obezbeđena SELECTED_REAL_KIND[8] unutrašnjom funkcijom.
^d ALGOL 68G's run time opcija ože se podesiti preciznim long long reals do obezbeđenja "number" značajnih cifara. Standardnekonstante long long real width i 'long long max real mogu se koristiti za određivanje stvarne preciznost.
^e IEEE decimalni tip će biti uveden sledećim COBOL standardom.
^f Iste veličine kao 'double' na mnogim implementacijama.

Integer Jednostruka tačnost Dvostruka tačnost Pola i četvrtna preciznost itd.
Ada[1] N/D Kompleksan[b] Kompleksan[b] Kompleksan[b]
ALGOL 68 N/D compl long compl etc. short compl etc. & long long compl etc.
C (C99)[9] N/D decimalni kompleksan dvostruko kompleksan N/D
C++ (STL) N/D std::complex<float> std::complex<double>
C# N/D N/D System.Numerics.Complex
(.Net 4.0)
Java N/D N/D N/D
Gou N/D complex64 complex128
D N/D cfloat cdouble
Objective-C N/D N/D N/D
Common Lisp
Šema
Paskal N/D N/D
Visual Basic N/D N/D
Visual Basic .NET N/D N/D System.Numerics.Complex
(.Net 4.0)
Perl Math::Complex
Perl 6 complex64 complex128 Complex
Pajton complex N/D
JavaScript N/D N/D
S-Lang N/D N/D
Fortran COMPLEX(KIND = n)[a]
Rubi Complex N/D Complex
Skala N/D N/D N/D
Seed7 N/D N/D complex
Smalltalk Complex Complex Complex
Windows PowerShell N/D N/D
OCaml N/D N/D Complex.t
F# System.Numerics.Complex
(.Net 4.0)
Standard ML N/D N/D N/D
Haskell (GHC) N/D Complex.Complex Float Complex.Complex Double
Ajfel N/D N/D N/D
KOBOL N/D N/D N/D
Mathematica Complex N/D N/D Complex
^a Vrednost "n" je obezbeđena SELECTED_REAL_KIND[8] unutrašnjom funkcijom.
^b Opšti tip koji se može instancirati sa bilo kojim baznim float tipom.

Ostale vrste barijabli

uredi
Tekst Bulov tip podataka Nabrajanje Objekat/Univerzalni
Znak Niska[a]
Ada[1] Character String & Bounded_String & Unbounded_String Boolean (item1, item2, ...) tagged null record
ALGOL 68 char string & bytes bool & bits N/D - User defined N/D
C (C99) char
wchar_t
N/D bool[b] enum «name» {item1, item2, ... }; void *
C++ (STL) «std::»string
Objective-C unichar NSString * BOOL id
C# char string bool enum name {item1, item2, ... } object
Java String boolean Object
Gou byte
rune
string bool const (
item1 = iota
item2
...
)
interface{}
Swift Character String Bool enum name { case item1, item2, ... } Any
D char string bool enum name {item1, item2, ... } std.variant.Variant
Common Lisp
Šema
ISLISP
Paskal (ISO) char N/D boolean (item1, item2, ...) N/D
Objekat Paskal (Delfi) string variant
Visual Basic N/D String Boolean Enum name
item1
item2
...
End Enum
Variant
Visual Basic .NET Char Object
Xojo N/D Object or Variant
Pajton N/D[d] str bool object
JavaScript N/D[d] String Boolean Object
S-Lang
Fortran CHARACTER(LEN = *) CHARACTER(LEN = :), allocatable LOGICAL(KIND = n)[f] CLASS(*)
PHP N/D[d] string bool (type declaration omitted)
Perl N/D[d] UNIVERZALNI
Perl 6 Char Str Bool enum name <item1 item2 ...> or
enum name <<:item1(value) :item2(value) ...>>
Mu
Rubi N/D[d] String Object[c] Object
Skala Char String Boolean object name extends Enumeration {
val item1, item2, ... = Value
}
Any
Seed7 char string boolean const type: name is new enum
item1,
item2,
...
end enum;
Windows PowerShell
OCaml char string bool N/D[e] N/D
F# type name = item1 = value | item2 = value | ... obj
Standard ML N/D[e] N/D
Haskell (GHC) Char String Bool N/D[e] N/D
Ajfel CHARACTER STRING BOOLEAN N/D ANY
KOBOL PIC X PIC X(string length) or PIC X«X...» PIC 1«(number of digitsor PIC 1«1...» N/D OBJECT REFERENCE
Mathematica N/D[d] String N/D

^a konkretno, upravlja nizovima proizvoljne dužine automatski.
^b Ovaj jezik predstavlja bulean kao ceo broj gde lažno predstavlja vrednost od nule i istinu od ne-nula vrednosti.
^c Sve vrednosti su ili tačne ili netačne. Sve TrueClass jednakosti tačnosti i sve FalseClass jednakosti netačnosti.
^d Ovaj jezik nema poseban tip znakova. Znakovi su predstavljeni kao stringovi dužine 1.
^e Nabrajanja na ovom jeziku su algebarske vrste samo sa nulari konstruktorima
^f Vrednost "n" je obezbeđena SELECTED_INT_KIND[4] unutrašnjom funkcijom.

Izvedene vrste

uredi
Fiksna veličina niza dinamička veličina niza
jednodimenzionalni niz višedimenzionalni niz jednodimenzionalni niz višedimenzionalni niz
Ada[1] array (<first> .. <last>) of <type>
or
array (<discrete_type>) of <type>
array (<first1> .. <last1>, <first2> .. <last2>, ...) of <type>
or
array (<discrete_type1>, <discrete_type2>, ...) of <type>
array (<discrete_type> range <>) of <type> array (<discrete_type1> range <>, <discrete_type2> range <>, ...) of <type>
ALGOL 68 [first:last]«modename»
or simply:
[size]«modename»
[first1:last1, first2:last2]«modename»
or
[first1:last1][first2:last2]«modename»
etc.
flex[first:last]«modename»
or simply:
flex[size]«modename»
flex[first1:last1, first2:last2]«modename»
or
flex[first1:last1]flex[first2:last2]«modename» etc.
C (C99) type name[size][a] type name[size1][size2][a] type *name
or within a block:
int n = ...; type name[n]
C++ (STL) «std::»array<type, size>(C++11) «std::»vector<type>
C# type[] type[,,...] System.Collections.ArrayList
or
System.Collections.Generic.List<type>
Java type[][b] type[][]...[b] ArrayList or ArrayList<type>
D type[size] type[size1][size2] type[]
Gou [size]type [size1][size2]...type []type [][]type
Swift [type] or Array<type> [[type]] or Array<Array<type>>
Objective-C NSArray NSMutableArray
JavaScript N/D N/D Array[d]
Common Lisp
Šema
ISLISP
Paskal array[first..last] of type[c] array[first1..last1] of array[first2..last2] ... of type [c]

or

array[first1..last1, first2..last2, ...] of type [c]

N/D N/D
Objekat Paskal (Delphi) array of type array of array ... of type
Visual Basic
Visual Basic .NET System.Collections.ArrayList
or
System.Collections.Generic.List(Of type)
Pajton list
S-Lang
Fortran type :: name(size) type :: name(size1, size2,...) type, ALLOCATABLE :: name(:) type, ALLOCATABLE :: name(:,:,...)
PHP array
Perl
Perl 6 Array[type] or Array of type
Rubi Array
Skala Array[type] Array[...[Array[type]]...] ArrayBuffer[type]
Seed7 array type
or
array [idxType] type
array array type
or
array [idxType] array [idxType] type
array type
or
array [idxType] type
array array type
or
array [idxType] array [idxType] type
Smalltalk Array OrderedCollection
Windows PowerShell type[] type[,,...]
OCaml type array type array ... array
F# type [] or type array type [,,...] System.Collections.ArrayList
or
System.Collections.Generic.List<type>
Standard ML type vector or type array
Haskell (GHC)
KOBOL level-number type OCCURS size «TIMES». one-dimensional array definition... level-number type OCCURS min-size TO max-size «TIMES» DEPENDING «ON» size.[e] N/D

^a U većini izraza (osim sizeof i & operatora), vrednosti niza tipa u C se automatski pretvaraju u pokazivača svog prvog argumenta.
^b C-like "type x[]"radi u Java, kako god "type[] x" je poželjan oblik niza deklaracije.
^c Subranges se koristi za definisanje granice niza.
^d JavaScript nizovi su posebna vrsta objekta.
^e The DEPENDING ON uslov u COBOL ne stvara za "tačnu" promenljivu dužine niza i uvek će izdvojiti maksimalnu veličinu niza.

Drugi tipovi

uredi
Jednosložni tipovi Algebarski tipovi podataka Veza
Zapis Lista
Ada[1] type identifier is «abstract» «tagged» «limited» [record
fieldname1 : type;
fieldname2 : type;
...

end record | null record]

N/D Any combination of records, unions and enumerations (as well as references to those, enabling recursive types). type identifier (variation : discrete_type) is record
case variation is
when choice_list1 =>
fieldname1 : type;
...
when choice_list2 =>
fieldname2 : type;
...
...
end case;
end record
ALGOL 68 struct (modename «fieldname», ...); Required types and operators can be user defined union (modename, ...);
C (C99) struct «name» {type name;...}; N/D N/D union {type name;...};
Objective-C
C++ struct «name» {type name;...};[b] «std::»tuple<type1..typen>
C# struct name {type name;...} N/D
Java N/D[a]
JavaScript N/D
D struct name {type name;...} std.variant.Algebraic!(type,...) union {type name;...}
Gou struct {
«name» type
...
}
Swift struct name {
var name «: type»
...
}
(«name1:» val1, «name2:» val2, «name3:» val3, ... ) enum name { case Foo«(types)» case Bar «(types)» ... }
Common Lisp (cons val1 val2)[c]
Scheme N/D
ISLISP
Paskal record
name: type;
...
end
N/D N/D record
case type of
value: (types);
...
end
Visual Basic
Visual Basic .NET Structure name
Dim name As type
...
End Structure
Pajton N/D[a] «(»val1, val2, val3, ... «)» N/D
S-Lang struct {name [=value], ...}
Fortran TYPE name
type :: name
...
END TYPE
PHP N/D[a]
Perl N/D[d] N/D
Perl 6 N/D[a]
Rubi OpenStruct.new({:name => value})
Skala case class name(«var» name: type, ...) (val1, val2, val3, ... ) abstract class name

case class Foo(«parameters») extends name

case class Bar(«parameters») extends name

...
or

abstract class name

case object Foo extends name

case object Bar extends name

...
or combination of case classes and case objects

Windows PowerShell
OCaml type name = {«mutable» name : type;...} «(»val1, val2, val3, ... «)» type name = Foo «of type» | Bar «of type» | ... N/D
F#
Standard ML type name = {name : type,...} (val1, val2, val3, ... ) datatype name = Foo «of type» | Bar «of type» | ...
Haskell data Name = Constr {name :: type,...} data Name = Foo «types» | Bar «types» | ...
KOBOL level-number name type clauses.

  level-number+n name type clauses.

  ...

N/D N/D name REDEFINES variable type.

^a Podržane su samo klase.
^b structs U C++ SU zapravo klase, ali su podrazumevane u javnosti i takođe POD objekti. C++11 je dodatno proširen, kako bi nastalo delovanje identičnog POD objekta u mnogim slučajevima
^c Samo par
^d Iako Perl nema evidenciju, jer je tip sistema koji omogućava različite vrste podataka u nizu, "hashes" (asocijativni nizovi) nemaju promenljivi indeks koji će efikasno biti isti kao i evidencije.
^e Nabrajanja na ovom jeziku su algebarske vrste sa samo nulari konstruktorima

Varijabile i konstante deklaracije

uredi
varijable konstante tip sinonima
Ada[1] identifier : type «:= initial_value»[e] identifier : constant type := final_value subtype identifier is type
ALGOL 68 modename name «:= initial_value»; modename name = value; mode synonym = modename;
C (C99) type name «= initial_value»; enum{ name = value }; typedef type synonym;
Objective-C
C++ const type name = value;
C# type name «= initial_value»; or
var name = value;
const type name = value; or
readonly type name = value;
using synonym = type;
D type name «= initial_value»; or
auto name = value;
const type name = value; or
immutable type name = value;
alias type synonym;
Java type name «= initial_value»; final type name = value; N/D
JavaScript var name «= initial_value»; const name = value;
Gou var name type «= initial_value» or
name := initial_value
const name «type» = value type synonym type
Swift var name «: type» «= initial_value» let name «: type» = value typealias synonym = type
Common Lisp (defparameter name initial_value) or
(defvar name initial_value) or
(setf (symbol-value 'symbol) initial_value)
(defconstant name value) (deftype synonym () 'type)
Šema (define name initial_value)
ISLISP (defglobal name initial_value) or
(defdynamic name initial_value)
(defconstant name value) N/D
Pascal[a] name: type «= initial_value» name = value synonym = type
Visual Basic Dim name As type Const name As type = value
Visual Basic .NET Dim name As type«= initial_value» Imports synonym = type
Xojo Dim name As type«= initial_value» N/D
Pajton name = initial_value N/D synonym = type[b]
CoffeeScript N/D
S-Lang name = initial_value; typedef struct {...} typename
Fortran type name type, PARAMETER :: name = value
PHP $name = initial_value; define("name", value);
const name = value (5.3+)
N/D
Perl «my» $name «= initial_value»;[c] use constant name => value;
Perl 6 «my «type»» $name «= initial_value»;[c] «my «type»» constant name = value; ::synonym ::= type
Rubi name = initial_value Name = value synonym = type[b]
Skala var name«: type» = initial_value val name«: type» = value type synonym = type
Windows PowerShell «[type]» $name = initial_value N/D N/D
Bash shell name=initial_value N/D N/D
OCaml let name «: type ref» = ref value[d] let name «: type» = value type synonym = type
F# let mutable name «: type» = value
Standard ML val name «: type ref» = ref value[d] val name «: type» = value
Haskell «name::type;» name = value type Synonym = type
Forth VARIABLE name (in some systems use value VARIABLE name instead) value CONSTANT name
KOBOL level-number name type clauses. «0»1 name CONSTANT «AS» value. level-number name type clauses «IS» TYPEDEF.
Mathematica name=initialvalue N/D N/D

^a Paskal ima deklaraciju blokova.
^b Tipovi su samo redovni objekti, tako da možete samo da ih dodelite.
^c U Perlu, "my" ključna reč scopes je promenljiva u bloku.
^d Tehnički, to ne izjašnjava ime da bude promenljiva promenljiva u ML, svi nazivi mogu biti vezani samo jednom; umesto toga, on izjavljuje ime do tačke na strukturi "referentnog" podatka, koja je jednostavna promenljivo kolona. Struktura podataka se onda može čitati i pisati koristeći ! i := operatore.
^[e] . Ako nema početne vrednosti, osnovna vrednost se automatski dodeljuje (koju će izazvati Run-time izuzetak ako se koristi pre nego što važi vrednost koja je dodeljena). Iako se ovakvo ponašanje može potisnuti preporučljivo je u interesu predvidljivosti. Ako nema nevažećih vrednosti može se naći za tip (na primer u slučaju nesmetano tipa integer), valjana, ali predvidljiva vrednost je izabrana umesto toga.

ako ako i samo ako switch iskazi uslovni iskazi
Ada[1] if condition then
statements
«else
statements»
end if
if condition1 then
statements
elsif condition2 then
statements
...
«else
statements»
end if
case expression is
when value_list1 => statements
when value_list2 => statements
...
«when others => statements»
end case
(if condition1 then
expression1
«elsif condition2 then
expression2»
...
else
expressionn
)
(case expression is
when value_list1 => expression1
when value_list2 => expression2
...
«when others => expressionn»
)
Seed7 case expression of
when set1 : statements
...
«otherwise: statements»
end case
Modula-2 if condition then
statements
«else
statements»
end
if condition1 then
statements
elsif condition2 then
statements
...
«else
statements»
end
case expression of
caseLabelList : statements |
...
«else statements»
end
ALGOL 68 & "brief form" if condition then statements «else statements» fi if condition then statements elif condition then statements fi case switch in statements, statements«,... out statements» esac ( condition | valueIfTrue | valueIfFalse )
( condition | statements «| statements» ) ( condition | statements |: condition | statements ) ( variable | statements,... «| statements» )
C (C99) if (condition) {instructions}
«else {instructions}»
if (condition) {instructions}
else if (
condition) {instructions}
...
«else {instructions}»
switch (variable) {
case case1: instructions «break;»
...
«default: instructions»
}
condition ? valueIfTrue : valueIfFalse
Objective-C
C++ (STL)
D
Java
JavaScript
PHP
C# switch (variable) {
case case1: instructions; «jump statement;»
...
«default: instructions; «jump statement;»»
}
Windows PowerShell if (condition) { instructions }
elseif (
condition) { instructions }
...
«else { instructions }»
switch (variable) { case1 { instructions «break;» } ... «default { instructions }»}
Go if condition {instructions}
«else {instructions}»
if condition {instructions}
else if
condition {instructions}
...
«else {instructions}»
or
switch {
case condition: instructions
...
«default: instructions»
}
switch variable {
case case1: instructions
...
«default: instructions»
}
Swift if condition {instructions}
«else {instructions}»
if condition {instructions}
else if
condition {instructions}
...
«else {instructions}»
switch variable {
case case1: instructions
...
«default: instructions»
}
Perl if (condition) {instructions}
«else {instructions}»
or
unless (notcondition) {instructions}
«else {instructions}»
if (condition) {instructions}
elsif (
condition) {instructions}
...
«else {instructions}»
or
unless (notcondition) {instructions}
elsif (
condition) {instructions}
...
«else {instructions}»
use feature "switch";
...
given (variable) {
when (case1) { instructions }
...
«default { instructions }»
}
condition ? valueIfTrue : valueIfFalse
Perl 6 if condition {instructions}
«else {instructions}»
or
unless notcondition {instructions}
if condition {instructions}
elsif
condition {instructions}
...
«else {instructions}
given variable {
when case1 { instructions }
...
«default { instructions }»
}
condition ?? valueIfTrue !! valueIfFalse
Rubi if condition
instructions
«else
instructions»
if condition
instructions
elsif condition
instructions
...
«else
instructions»
end
case variable
when case1
instructions
...
«else
instructions»
end
condition ? valueIfTrue : valueIfFalse
Skala if (condition) {instructions}
«else {instructions}»
if (condition) {instructions}
else if (
condition) {instructions}
...
«else {instructions}»
expression match {
case pattern1 => expression
case pattern2 => expression
...
«case _ => expression»
}[b]
if (condition) valueIfTrue else valueIfFalse
Smalltalk condition ifTrue:
trueBlock
«ifFalse:
falseBlock»
end
condition ifTrue: trueBlock ifFalse: falseBlock
Common Lisp (when condition
instructions)
or
(unless condition
instructions)
or
(if condition
(progn instructions)
«(progn instructions)»)
(cond (condition1 instructions)
(condition2 instructions)
...
«(t instructions)»)
(case expression
(case1 instructions)
(case2 instructions)
...
«(otherwise instructions)»)
(if condition valueIfTrue valueIfFalse)
Šema (when conditioninstructions) or
(if condition (begin instructions) «(begin instructions)»)
(cond (condition1 instructions) (condition2 instructions) ... «(else instructions)») (case (variable) ((case1) instructions) ((case2) instructions) ... «(else instructions)»)
ISLISP (if condition
(progn instructions)
«(progn instructions)»)
(cond (condition1 instructions)
(condition2 instructions)
...
«(t instructions)»)
(case expression
(case1 instructions)
(case2 instructions)
...
«(t instructions)»)
(if condition valueIfTrue valueIfFalse)
Paskal if condition then begin
instructions
end
«else begin
instructions
end»[c]
if condition then begin
instructions
end
else if
condition then begin
instructions
end
...
«else begin
instructions
end»[c]
case variable of
case1: instructions
...
«else: instructions»
end[c]
Visual Basic If condition Then
instructions
«Else
instructions»
End If
If condition Then
instructions
ElseIf condition Then
instructions
...
«Else
instructions»
End If
Select Case variable
Case case1
instructions
...
«Case Else
instructions»
End Select
IIf(condition, valueIfTrue, valueIfFalse)
Visual Basic .NET If(condition, valueIfTrue, valueIfFalse)
Xojo
Pajton [a] if condition :
Tab ↹ instructions
«else:
Tab ↹ instructions»
if condition :
Tab ↹ instructions
elif condition :
Tab ↹ instructions
...
«else:
Tab ↹ instructions»
valueIfTrue if condition else valueIfFalse
(Python 2.5+)
S-Lang if (condition) { instructions } «else { instructions }» if (condition) { instructions } else if (condition) { instructions } ... «else { instructions }» switch (variable) { case case1: instructions } { case case2: instructions } ...
Fortran IF (condition) THEN
instructions
ELSE
instructions
ENDIF
IF (condition) THEN
instructions
ELSEIF (condition) THEN
instructions
... ELSE
instructions
ENDIF
SELECT CASE(variable)
CASE (case1)
instructions
... CASE DEFAULT
instructions
END SELECT
Forth condition IF instructions « ELSE instructions» THEN condition IF instructions ELSE condition IF instructions THEN THEN value CASE
case OF instructions ENDOF
case OF instructions ENDOF
     default instructions
ENDCASE
condition IF valueIfTrue ELSE valueIfFalse THEN
OCaml if condition then begin instructions end «else begin instructions end» if condition then begin instructions end else if condition then begin instructions end ... «else begin instructions end» match value with
pattern1 -> expression
|
pattern2 -> expression
...
«| _ -> expression»[b]
if condition then valueIfTrue else valueIfFalse
F# if condition then
Tab ↹ instructions
«else
Tab ↹ instructions»
if condition then
Tab ↹ instructions
elif condition then
Tab ↹ instructions
...
«else
Tab ↹ instructions»
Standard ML if condition then «(»instructions «)»
else «(» instructions «)»
if condition then «(»instructions «)»
else if condition then «(» instructions «)»
...
else «(» instructions «)»
case value of
pattern1 => expression
|
pattern2 => expression
...
«| _ => expression»[b]
Haskell (GHC) if condition then expression else expression
or
when condition (do instructions)
or
unless notcondition (do instructions)
result | condition = expression
| condition = expression
| otherwise = expression
case value of {
pattern1 -> expression;
pattern2 ->expression;
...
«_ -> expression»
}[b]
Bash shell

if condition-command; then
    expression
«else
    expression»
fi

if condition-command; then
    expression
elif condition-command; then
    expression
«else
    expression»
fi

case "$variable" in
"$condition1" )
    command...


"$condition2" )
    command...


esac

CoffeeScript if condition then expression «else expression» if condition then expression else if condition then expression «else expression» switch expression
when condition then expression
else expression
All conditions are expressions
if condition
expression
«else
expression»
if condition
expression
else if condition
expression
«else
expression»
expression if condition unless condition
expression
else unless condition
expression
«else
expression»
switch expression
when condition
expression
«else
expression»
unless condition
expression
«else
expression»
expression unless condition
KOBOL IF condition «THEN»
expression
«ELSE
expression».
[d]
EVALUATE expression «ALSO expression...»
WHEN case-or-condition «ALSO case-or-condition...»
expression
...
«WHEN OTHER
expression»
END-EVALUATE
if else if select case conditional expression
^a Jedna instrukcija može biti napisana na istoj liniji nakon glavnog dela. Višestruka uputstva su grupisana u bloku koji počinje novim redom (uvlačenje je potrebno). Uslovna iskazna sintaksa ne prati ovo pravilo.
^b Ovo je obrazac podudaranja i sličan je izabranom slučaju ali ne i isti. Obično se koristi da dekonstruiše algebarski tip strukture.
^c U jezicima sličnim Paskalu, zapeta nije deo izjave. To je separator između izjava, ne terminator.
^d END-IF može da se koristi umesto perioda na kraju.
while do while for i = first to last foreach
Ada[1] while condition loop
statements
end loop
loop
statements
exit when not condition
end loop
for index in «reverse» [first .. last | discrete_type] loop
statements
end loop
for item of «reverse» iterator loop
statements
end loop

(for [all | some] [in | of] [first .. last | discrete_type | iterator] => predicate)[b]
ALGOL 68 «for index» «from first» «by increment» «to last» «while condition» do statements od for key «to upb list» do «typename val=list[key];» statements od
«while condition»

    do statements od

«while statements; condition»

    do statements od

«for index» «from first» «by increment» «to last» do statements od
C (C99) while (condition) { instructions } do { instructions } while (condition) for («type» i = first; i <= last; ++i) { instructions } N/D
Objective-C for (type item in set) { instructions }
C++ (STL) «std::»for_each(start, end, function)

(C++11) for (type item : set) { instructions }

C# foreach (type item in set) { instructions }
Java for (type item : set) { instructions }
JavaScript for (var i = first; i <= last; i++) { instructions } for (var index in set) { instructions }
or
for each (var item in set) { instructions }
(JS 1.6+, deprecated[10])
or
for (var item of set) { instructions } (EcmaScript 6 proposal, supported in Firefox[11])
PHP foreach (range(first, last) as $i) { instructions } or
for ($i = first; $i <= last; $i++) { instructions }
foreach (set as item) { instructions }
or
foreach (set as key => item) { instructions }
Windows PowerShell for ($i = first; $i -le last; $i++) { instructions } foreach (item in set) { instructions using item }
D foreach (i; first ... last) { instructions } foreach («type» item; set) { instructions }
Gou for condition { instructions } for i := first; i <= last; i++ { instructions } for key, item := range set { instructions }
Swift while condition { instructions } repeat { instructions } while condition (2.x)
do { instructions } while condition (1.x)
for i = first ... last { instructions } or
for i = first ..< last+1 { instructions } or
for var i = first; i <= last; i++ { instructions }
for item in set { instructions }
Perl while (condition) { instructions } or
until (notcondition) { instructions }
do { instructions } while (condition) or
do { instructions } until (notcondition)
for«each» «$i» (first .. last) { instructions } or
for ($i = first; $i <= last; $i++) { instructions }
for«each» «$item» (set) { instructions }
Perl 6 while condition { instructions } or
until notcondition { instructions }
repeat { instructions } while condition or
repeat { instructions } until notcondition
for first..last -> $i { instructions } or
loop ($i = first; $i <=last; $i++) { instructions }
for set« -> $item» { instructions }
Rubi while condition
instructions
end
or
until notcondition
instructions
end
begin
instructions
end while condition
or
begin
instructions
end until notcondition
for i in first..last
instructions
end
or
for i in first...last+1
instructions
end
or
first.upto(last) { |i| instructions }
for item in set
instructions
end
or
set.each { |item| instructions }
Bash shell while condition ;do
instructions
done
or
until notcondition ;do
instructions
done
N/D for ((i = first; i <= last; ++i)) ; do
instructions

done

for item in set ;do
instructions
done
Skala while (condition) { instructions } do { instructions } while (condition) for (i <- first to last «by 1») { instructions }
or
first to last «by 1» foreach (i => { instructions })
for (item <- set) { instructions }
or
set foreach (item => { instructions })
Smalltalk conditionBlock whileTrue:
loopBlock
loopBlock doWhile:
conditionBlock
first to: last do:
loopBlock
collection do:
loopBlock
Common Lisp (loop
while condition
do
instructions)
or
(do () (notcondition)
instructions)
(loop
do
instructions
while condition)
(loop
for i from first to last «by 1»
do
instructions)
or
(dotimes (i N)
instructions)
or
(do ((i first (1+ i))) ((>= i last))
instructions)
(loop
for item in set
do
instructions)
or
(dolist (item set)
instructions)
or
(mapc function list) or
(map 'type function sequence)
Šema (do () (notcondition) instructions) or
(let loop () (if condition (begin instructions (loop))))
(let loop () (instructions (if condition (loop)))) (do ((i first (+ i 1))) ((>= i last)) instructions) or
(let loop ((i first)) (if (< i last) (begin instructions (loop (+ i 1)))))
(for-each (lambda (item) instructions) list)
ISLISP (while condition instructions) (tagbody loop instructions (if condition (go loop)) (for ((i first (+ i 1))) ((>= i last)) instructions) (mapc (lambda (item) instructions) list)
Paskal while condition do begin
instructions
end
repeat
instructions
until notcondition;
for i := first «step 1» to last do begin
instructions
end;[a]
for item in set do ...
Visual Basic Do While condition
instructions
Loop
or
Do Until notcondition
instructions
Loop
Do
instructions
Loop While condition
or
Do
instructions
Loop Until notcondition
For i = first To last «Step 1»
instructions
Next i
For Each item In set
instructions
Next item
Visual Basic .NET For i «As type» = first To last «Step 1»
instructions
Next i[a]
For Each item As type In set
instructions
Next item
Xojo While condition
instructions
Wend
Do Until notcondition
instructions
Loop
or
Do
instructions
Loop Until notcondition
Pajton while condition :
Tab ↹ instructions
«else:
Tab ↹ instructions»
N/D for i in range(first, last+1):
Tab ↹ instructions
«else:
Tab ↹ instructions»
(Python 3.x)

for i in xrange(first, last+1):
Tab ↹ instructions
«else:
Tab ↹instructions»
(Python 2.x)

for item in set:
Tab ↹ instructions
«else:
Tab ↹ instructions»
S-Lang while (condition) { instructions } «then optional-block» do { instructions } while (condition) «then optional-block» for (i = first; i <= last; i++) { instructions } «then optional-block» foreach item(set) «using (what)» { instructions } «then optional-block»
Fortran DO WHILE (condition)
instructions
ENDDO
DO
instructions
IF (
condition) EXIT
ENDDO
DO I = first,last
instructions
ENDDO
N/D
Forth BEGIN « instructions » condition WHILE instructions REPEAT BEGIN instructions condition UNTIL limit start DO instructions LOOP N/D
OCaml while condition do instructions done N/D for i = first to last do instructions done Array.iter (fun item -> instructions) array
List.iter (fun item -> instructions) list
F# while condition do
Tab ↹ instructions
N/D for i = first to last do
Tab ↹ instructions
for item in set do
Tab ↹ instructions
or
Seq.iter (fun item -> instructions) set
Standard ML while condition do ( instructions ) N/D Array.app (fn item => instructions) array
app (fn item => instructions) list
Haskell (GHC) N/D Control.Monad.forM_ [first..last] (\i -> do instructions) Control.Monad.forM_ list (\item -> do instructions)
Ajfel from
setup
until
condition
loop
instructions
end
CoffeeScript while condition
expression
N/D for i in [first..last]
expression
for item in set
expression
expression while condition
while condition then expression
until condition
expression
expression until condition for i in [first..last] then expression for item in set then expression
until condition then expression expression for i in [first..last] expression for item in set
COBOL PERFORM procedure-1 «THROUGH procedure-2» ««WITH» TEST BEFORE» UNTIL condition[c] PERFORM procedure-1 «THROUGH procedure-2» «WITH» TEST AFTER UNTIL condition[c] PERFORM procedure-1 «THROUGH procedure-2» VARYING i FROM first BY increment UNTIL i > last[d] N/D
PERFORM ««WITH» TEST BEFORE» UNTIL condition
expression
END-PERFORM
PERFORM «WITH» TEST AFTER UNTIL condition
expression
END-PERFORM
PERFORM VARYING i FROM first BY increment UNTIL i > last
expression
END-PERFORM[d]
^a "step n" se koristi za promenu interval petlje. Ako je "step" izostavljen, onda interval petlja je 1.
^b Ovaj sprovodi univerzalni kvantifikator ("za sve" ili "∀") kao i egzistencijalni kvantifikator ("postoji" ili "∃").
^c THRU se može koristiti umesto THROUGH.
^d «IS» GREATER «THAN» se može koristiti umesto >.
domašaj opis tvrdnja
Ada[1] raise exception_name «with string_expression» begin
statements
exception
when exception_list1 => statements;
when exception_list2 => statements;
...
«when others => statements;»
end[b]
pragma Assert («Check =>» boolean_expression ««Message =>» string_expression»)

[function | procedure | entry] with
Pre => boolean_expression
Post => boolean_expression

any_type with Type_Invariant => boolean_expression
C (C99) longjmp(state, exception); switch (setjmp(state)) { case 0: instructions break; case exception: instructions ... } assert(condition);
C++ throw exception; try { instructions } catch «(exception)» { instructions } ...
C# try { instructions } catch «(exception)» { instructions } ... «finally { instructions }» Debug.Assert(condition);
Java try { instructions } catch (exception) { instructions } ... «finally { instructions }» assert condition;
JavaScript try { instructions } catch (exception) { instructions } «finally { instructions }» ?
D try { instructions } catch (exception) { instructions } ... «finally { instructions }» assert(condition);
PHP try { instructions } catch (exception) { instructions } «finally { instructions }» assert(condition);
S-Lang try { instructions } catch «exception» { instructions } ... «finally { instructions }» ?
Windows PowerShell trap «[exception]» { instructions } ... instructions or try { instructions } catch «[exception]» { instructions } ... «finally { instructions }» [Debug]::Assert(condition)
Objective-C @throw exception; @try { instructions } @catch (exception) { instructions } ... «@finally { instructions }» NSAssert(condition, description);
Swift throw exception (2.x) do { try expression ... instructions } catch exception { instructions } ... (2.x) assert(condition«, description»)
Perl die exception; eval { instructions }; if ($@) { instructions } ?
Perl 6 try { instructions CATCH { when exception { instructions } ...}} ?
Rubi raise exception begin
instructions
rescue exception
instructions
...
«else
instructions»
«ensure
instructions»
end
Smalltalk exception raise instructionBlock on: exception do: handlerBlock assert: conditionBlock
Common Lisp (error "exception") or
(error (make-condition
type
arguments))
(handler-case
(progn instructions)
(exception instructions)
...)
or
(handler-bind
(condition
(lambda
instructions
«invoke-restart restart args»))
...)[a]
(assert condition) or
(assert condition
«(place)
«error»»)
or
(check-type var type)
Šema (R6RS) (raise exception) (guard (con (condition instructions) ...) instructions) ?
ISLISP (error "error-string" objects) or
(signal-condition condition continuable)
(with-handler
handler form*)
?
Paskal raise Exception.Create() try Except on E: exception do begin instructions end; end; ?
Visual Basic Err.Raise ERRORNUMBER With New Try: On Error Resume Next
OneInstruction
.Catch: On Error GoTo 0: Select Case .Number
Case ERRORNUMBER
instructions
End Select: End With
'*** Try class ***
Private mstrDescription As String
Private mlngNumber As Long
Public Sub Catch()

mstrDescription = Err.Description

mlngNumber = Err.Number

End Sub
Public Property Get Number() As Long

Number = mlngNumber

End Property
Public Property Get Description() As String

Description = mstrDescription
End Property
[12]
Debug.Assert condition
Visual Basic .NET Throw exception Try
instructions
Catch «exception» «When condition»
instructions
...
«Finally
instructions»
End Try
Debug.Assert(condition)
Xojo Raise exception Try
instructions
Catch «exception»
instructions
...
«Finally
instructions»
End Try
N/D
Pajton raise exception try:
Tab ↹ instructions
except «exception»:
Tab ↹ instructions
...
«else:
Tab ↹ instructions»
«finally:
Tab ↹ instructions»
assert condition
Fortran N/D
Forth code THROW xt CATCH ( code or 0 ) N/D
OCaml raise exception try expression with pattern -> expression ... assert condition
F# try expression with pattern -> expression ...

or
try expression finally expression

Standard ML raise exception «arg» expression handle pattern => expression ...
Haskell (GHC) throw exception
or
throwError expression
catch tryExpression catchExpression
or
catchError tryExpression catchExpression
assert condition expression
KOBOL RAISE «EXCEPTION» exception USE «AFTER» EXCEPTION OBJECT class-name. or

USE «AFTER» EO class-name. or

USE «AFTER» EXCEPTION CONDITION exception-name «FILE file-name». or

USE «AFTER» EC exception-name «FILE file-name».

N/D
^a Common Lisp omogućuje with-simple-restart, restart-case i restart-bind za definisanje restartovanja za korišćenje sa invoke-restart. Uslovi neizuzetaka se mogu izazvati primenama da pokažu korisniku da se meni restartuje pre nego što odpočne.
^b Bezuslovni izuzeci su propagirani u najdublja dinamički prihvatna izvršenja. Izuzeci ne propagiraju preko zadataka (osim ako su ovi zadaci trenutno sinhronizovani u sastancima).

Ostali izveštaji upravljanja protokom

uredi
izlaz bloka (pauza) nastavak Dugme grana (goto) vraća vrednost iz generatora
Ada[1] exit «loop_name» «when condition» N/D label: goto label N/D
ALGOL 68 value exit; ... do statements; skip exit; label: statements od label: ... go to label; ...

goto label; ...

label; ...

yield(value)

(Callback)[13]

C (C99) break; continue; label: goto label; N/D
Objective-C
C++ (STL)
D
C# yield return value;
Java break «label»; continue «label»; N/D
JavaScript yield value«;»
PHP break «levels»; continue «levels»; goto label; yield «key =>» value;
Perl last «label»; next «label»;
Perl 6
Gou break «label» continue «label» goto label
Swift break «label» continue «label» N/D
Bash shell break «levels» continue «levels» N/D N/D N/D
Common Lisp (return) or
(return-from block) or
(loop-finish)
(tagbody tag
...
tag
...)
(go tag)
Šema
ISLISP (return-from block) (tagbody tag
...
tag
...)
(go tag)
Paskal (ISO) N/D label:[a] goto label; N/D
Paskal (FPC) break; continue;
Visual Basic Exit block N/D label: GoTo label
Visual Basic .NET Continue block
Xojo
Pajton break continue N/D yield value
RPG IV LEAVE; ITER;
S-Lang break; continue;
Fortran EXIT CYCLE label[b] GOTO label N/D
Rubi break next
Windows PowerShell break «label» continue
OCaml N/D
F#
Standard ML
Haskell (GHC)
KOBOL EXIT PERFORM or EXIT PARAGRAPH or EXIT SECTION or EXIT. EXIT PERFORM CYCLE label «SECTION». GO TO label N/D
Ya break «from where»; f.e.

break for switch;

continue «to where»; f.e.

continue for switch;

:label goto :label; N/D
^a Paskal ima deklaraciju blokova.
^b dugme mora biti broj između 1 i 99999.
pozivanje funkcijom osnova/praznina funkcije vraćanje vrednosti funkcije potreba glavni potprogram
Ada[1] foo «(parameters)» procedure foo «(parameters)» is begin statements end foo function foo «(parameters)» return type is begin statements end foo N/D
ALGOL 68 foo«(parameters)»; proc foo = «(parameters)» void: ( instructions ); proc foo = «(parameters)» rettype: ( instructions ...; retvalue ); N/D
C (C99) foo(«parameters») void foo(«parameters») { instructions } type foo(«parameters») { instructions ... return value; } «global declarations»
int main(«int argc, char *argv[]») {
instructions
}
Objective-C
C++ (STL)
C# static void Main(«string[] args») { instructions } or
static int Main(«string[] args») { instructions }
Java public static void main(String[] args) { instructions } or
public static void main(String... args) { instructions }
D int main(«char[][] args») { instructions} or
int main(«string[] args») { instructions} or
void main(«char[][] args») { instructions} or
void main(«string[] args») { instructions}
JavaScript function foo(«parameters») { instructions } or
var foo = function («parameters») {instructions } or
var foo = new Function («"parameter", ... ,"last parameter"» "instructions");
function foo(«parameters») { instructions ... return value; } N/D
Gou func foo(«parameters») { instructions } func foo(«parameters») type { instructions ... return value } func main() { instructions }
Swift func foo(«parameters») { instructions } func foo(«parameters») -> type { instructions ... return value } N/D
Common Lisp (foo «parameters») (defun foo («parameters»)
instructions)
or
(setf (symbol-function 'symbol)
lambda)
(defun foo («parameters»)
...
value)
N/D
Šema (define (foo parameters) instructions) or
(define foo (lambda (parameters) instructions))
(define (foo parameters) instructions... return_value) or
(define foo (lambda (parameters) instructions... return_value))
ISLISP (defun foo («parameters»)
instructions)
(defun foo («parameters»)
...
value)
Paskal foo«(parameters)» procedure foo«(parameters)»; «forward;»[a] «label
label declarations»
«const
constant declarations»
«type
type declarations»
«var
variable declarations»
«local function declarations»
begin
instructions
end;
function foo«(parameters)»: type; «forward;»[a] «label
label declarations»
«const
constant declarations»
«type
type declarations»
«var
variable declarations»
«local function declarations»
begin
instructions;
foo :=
value
end;
program name; «label
label declarations»
«const
constant declarations»
«type
type declarations»
«var
variable declarations»
«function declarations»
begin
instructions
end.
Visual Basic Foo(«parameters») Sub Foo(«parameters»)
instructions
End Sub
Function Foo(«parameters») As type
instructions
Foo = value
End Function
Sub Main()
instructions
End Sub
Visual Basic .NET Function Foo(«parameters») As type
instructions
Return value
End Function
Sub Main(«ByVal CmdArgs() As String»)
instructions
End Sub
or
Function Main(«ByVal CmdArgs() As String») As Integer
instructions
End Function
Xojo
Pajton foo(«parameters») def foo(«parameters»):
Tab ↹ instructions
def foo(«parameters»):
Tab ↹ instructions
Tab ↹ return value
N/D
S-Lang foo(«parameters» «;qualifiers») define foo («parameters») { instructions } define foo («parameters») { instructions ... return value; } public define slsh_main () { instructions }
Fortran foo («arguments»)
CALL sub_foo (
«arguments»)[c]
SUBROUTINE sub_foo («arguments»)
instructions
END SUBROUTINE[c]
type FUNCTION foo («arguments»)
instructions
...
foo = value
END FUNCTION[c]
PROGRAM main
instructions
END PROGRAM
Forth «parameters» FOO : FOO « stack effect comment: ( before -- ) »
instructions
 ;
: FOO « stack effect comment: ( before -- after ) »
instructions
 ;
N/D
PHP foo(«parameters») function foo(«parameters») { instructions } function foo(«parameters») { instructions ... return value; } N/D
Perl foo(«parameters») or
&foo«(parameters)»
sub foo { «my (parameters) = @_;» instructions } sub foo { «my (parameters) = @_;» instructions... «return» value; }
Perl 6 foo(«parameters») or
&foo«(parameters)»
«multi »sub foo(parameters) { instructions } «our «type» »«multi »sub foo(parameters) { instructions... «return» value; }
Rubi foo«(parameters)» def foo«(parameters)»
instructions
end
def foo«(parameters)»
instructions
«return» value
end
Skala def foo«(parameters)»«: Unit =» { instructions } def foo«(parameters)»«: type» = { instructions ... «return» value } def main(args: Array[String]) { instructions }
Windows PowerShell foo «parameters» function foo { instructions };
or
function foo { «param(parameters)» instructions }
function foo «(parameters)» { instructions return value }; or
function foo { «param(parameters)» instructions return value }
N/D
Bash shell foo «parameters»

function foo {
    instructions
}
or
foo () {
    instructions
}

function foo {
    instructions
    return «exit_code»
}
or
foo () {
    instructions
    return «exit_code»
}

  • parameters
    • $n ($1, $2, $3, ...)
    • $@ (all parameters)
    • $# (the number of parameters)
    • $0 (this function name)
OCaml foo parameters let «rec» foo parameters = instructions let «rec» foo parameters = instructions... return_value
F# [<EntryPoint>] let main args = instructions
Standard ML fun foo parameters = ( instructions ) fun foo parameters = ( instructions... return_value )
Haskell foo parameters = do
Tab ↹ instructions
foo parameters = return_value
or
foo parameters = do
Tab ↹ instructions
Tab ↹ return value
«main :: IO ()»
main = do instructions
Ajfel foo («parameters») foo («parameters»)
require
preconditions
do
instructions
ensure
postconditions
end
foo («parameters»): type
require
preconditions
do
instructions
Result := value
ensure
postconditions
end
[b]
CoffeeScript foo() foo = -> foo = -> value N/D
foo parameters foo = () -> foo = ( parameters ) -> value
COBOL CALL "foo" «USING parameters»
«exception-handling»
«END-CALL»
[d]
«IDENTIFICATION DIVISION.»

PROGRAM-ID. foo.

«other divisions...»

PROCEDURE DIVISION «USING parameters».

instructions.
«IDENTIFICATION DIVISION.»

PROGRAM-ID/FUNCTION-ID. foo.

«other divisions...»

DATA DIVISION.

«other sections...»

LINKAGE SECTION.

«parameter definitions...»

variable-to-return definition

«other sections...»

PROCEDURE DIVISION «USING parameters» RETURNING variable-to-return.

instructions.
N/D
«FUNCTION» foo«(«parameters»)» N/D
^a Paskal zahteva "forward;" za forward deklaracijas.
^b Ajfelova omogućava specifikaciju korena klase aplikaciju i funkcije.
^c U Fortranu, funkcija/potprogram parametara se nazivaju argumentima (dok PARAMETER je ključna reč jezika); CALL je ključna reč za potprogram.
^d Koristi umesto "foo", niza promenljivu koja se može koristiti umesto sadržaja iste vrednosti.

Gde je string označen kao decimalni broj:

string za integer string za long integer string za floating point integer za string floating point za string
Ada[1] Integer'Value (string_expression) Long_Integer'Value (string_expression) Float'Value (string_expression) Integer'Image (integer_expression) Float'Image (float_expression)
ALGOL 68 with general, and then specific formats With prior declarations and association of: string buf := "12345678.9012e34 "; file proxy; associate(proxy, buf);
get(proxy, ivar); get(proxy, livar); get(proxy, rvar); put(proxy, ival); put(proxy, rval);
getf(proxy, ($g$, ivar));
orv

getf(proxy, ($dddd$, ivar));

getf(proxy, ($g$, livar));
or

getf(proxy, ($8d$, livar));

getf(proxy, ($g$, rvar));
or

getf(proxy, ($8d.4dE2d$, rvar));

putf(proxy, ($g$, ival));
or

putf(proxy, ($4d$, ival));

putf(proxy, ($g(width, places, exp)$, rval));
or

putf(proxy, ($8d.4dE2d$, rval));
etc.

C (C99) integer = atoi(string); long = atol(string); float = atof(string); sprintf(string, "%i", integer); sprintf(string, "%f", float);
Objective-C integer = [string intValue]; long = [string longLongValue]; float = [string doubleValue]; string = [NSString stringWithFormat:@"%i", integer]; string = [NSString stringWithFormat:@"%f", float];
C++ (STL) «std::»istringstream(string) >> number; «std::»ostringstream o; o << number; string = o.str();
C++11 integer = «std::»stoi(string); long = «std::»stol(string); float = «std::»stof(string);

double = «std::»stod(string);

string = «std::»to_string(number);
C# integer = int.Parse(string); long = long.Parse(string); float = float.Parse(string); or
double = double.Parse(string);
string = number.ToString();
D integer = std.conv.to!int(string) long = std.conv.to!long(string) float = std.conv.to!float(string) or
double = std.conv.to!double(string)
string = std.conv.to!string(number)
Java integer = Integer.parseInt(string); long = Long.parseLong(string); float = Float.parseFloat(string); or
double = Double.parseDouble(string);
string = Integer.toString(integer); or
string = String.valueOf(integer);
string = Float.toString(float); or
string = Double.toString(double);
JavaScript[a] integer = parseInt(string); float = parseFloat(string); or
float = new Number (string) or
float = Number (string) or
float = +string
string = number.toString (); or
string = new String (number); or
string = String (number); or
string = number+"";
Gou integer, error = strconv.Atoi(string) or
integer, error = strconv.ParseInt(string, 10, 0)
long, error = strconv.ParseInt(string, 10, 64) float, error = strconv.ParseFloat(string, 64) string = strconv.Itoa(integer) or
string = strconv.FormatInt(integer, 10) or
string = fmt.Sprint(integer)
string = strconv.FormatFloat(float) or
string = fmt.Sprint(float)
Common Lisp (setf integer (parse-integer string)) (setf float (read-from-string string)) (setf string (princ-to-string number))
Šema (define number (string->number string)) (define string (number->string number))
ISLISP (setf integer (convert string <integer>)) (setf float (convert string <float>)) (setf string (convert number <string>))
Paskal integer := StrToInt(string); float := StrToFloat(string); string := IntToStr(integer); string := FloatToStr(float);
Visual Basic integer = CInt(string) long = CLng(string) float = CSng(string) or
double = CDbl(string)
string = CStr(number)
Visual Basic .NET
Xojo integer = Val(string) long = Val(string) double = Val(string) or
double = CDbl(string)
string = CStr(number) or
string = Str(number)
Pajton integer = int(string) long = long(string) float = float(string) string = str(number)
S-Lang integer = atoi(string); long = atol(string); float = atof(string); string = string(number);
Fortran READ(string,format) number WRITE(string,format) number
PHP integer = intval(string); or
integer = (int)string;
float = floatval(string); or
float = (float)string;
string = "number"; or
string = strval(number); or
string = (string)number;
Perl[b] number = 0 + string; string = "number";
Perl 6 number = +string; string = ~number;
Rubi integer = string.to_i or
integer = Integer(string)
float = string.to_f or
float = Float(string)
string = number.to_s
Skala integer = string.toInt long = string.toLong float = string.toFloat or
double = string.toDouble
string = number.toString
Smalltalk integer := Integer readFrom: string float := Float readFrom: string string := number asString
Windows PowerShell integer = [int]string long = [long]string float = [float]string string = [string]number; or
string = "number"; or
string = (number).ToString()
OCaml let integer = int_of_string string let float = float_of_string string let string = string_of_int integer let string = string_of_float float
F# let integer = int string let integer = int64 string let float = float string let string = string number
Standard ML val integer = Int.fromString string val float = Real.fromString string val string = Int.toString integer val string = Real.toString float
Haskell (GHC) number = read string string = show number
KOBOL MOVE «FUNCTION» NUMVAL(string)[c] TO number MOVE number TO numeric-edited

^a JavaScript koristi samo decimalni broj, tako da su neki tehnikalije.[7]
^b Perl nema odvojene vrste. Stringovi i brojevi su zamenljivi.
^c NUMVAL-C ili NUMVAL-F se mogu zameniti umesto NUMVAL.

čitan pisan u
stdin stdout stderr
Ada[1] Get (x) Put (x) Put (Standard_Error, x)
ALGOL 68 readf(($format$, x)); or
getf(stand in, ($format$, x));
printf(($format$, x)); or
putf(stand out, ($format$, x));
putf(stand error, ($format$, x));[a]
C (C99) scanf(format, &x); or
fscanf(stdin, format, &x); [b]
printf( format, x); or
fprintf(stdout, format, x); [c]
fprintf(stderr, format, x );[d]
Objective-C data = [[NSFileHandle fileHandleWithStandardInput] readDataToEndOfFile]; [[NSFileHandle fileHandleWithStandardOutput] writeData:data]; [[NSFileHandle fileHandleWithStandardError] writeData:data];
C++ «std::»cin >> x; or
«std::»getline(«std::»cin, str);
«std::»cout << x; «std::»cerr << x; or
«std::»clog << x;
C# x = Console.Read(); or
x = Console.ReadLine();
Console.Write(«format, »x); or
Console.WriteLine(«format, »x);
Console.Error.Write(«format, »x); or
Console.Error.WriteLine(«format, »x);
D x = std.stdio.readln() std.stdio.write(x) or
std.stdio.writeln(x) or
std.stdio.writef(format, x) or
std.stdio.writefln(format, x)
stderr.write(x) or
stderr.writeln(x) or
std.stdio.writef(stderr, format, x) or
std.stdio.writefln(stderr, format, x)
Java x = System.in.read(); or
x = new Scanner(System.in).nextInt(); or
x = new Scanner(System.in).nextLine();
System.out.print(x); or
System.out.printf(format, x); or
System.out.println(x);
System.err.print(x); or
System.err.printf(format, x); or
System.err.println(x);
Gou fmt.Scan(&x) or
fmt.Scanf(format, &x) or
x = bufio.NewReader(os.Stdin).ReadString('\n')
fmt.Println(x) or
fmt.Printf(format, x)
fmt.Fprintln(os.Stderr, x) or
fmt.Fprintf(os.Stderr, format, x)
Swift x = readLine() (2.x) print(x) (2.x)
println(x) (1.x)
JavaScript
Web Browser implementation
document.write(x)
JavaScript
Active Server Pages
Response.Write(x)
JavaScript
Windows Script Host
x = WScript.StdIn.Read(chars) or
x = WScript.StdIn.ReadLine()
WScript.Echo(x) or
WScript.StdOut.Write(x) or
WScript.StdOut.WriteLine(x)
WScript.StdErr.Write(x) or
WScript.StdErr.WriteLine(x)
Common Lisp (setf x (read-line)) (princ x) or
(format t format x)
(princ x *error-output*) or
(format *error-output* format x)
Šema (R6RS) (define x (read-line)) (display x) or
(format #t format x)
(display x (current-error-port)) or
(format (current-error-port) format x)
ISLISP (setf x (read-line)) (format (standard-output) format x) (format (error-output) format x)
Paskal read(x); or
readln(x);
write(x); or
writeln(x);
N/D
Visual Basic Input« prompt,» x Print x or
? x
Visual Basic .NET x = Console.Read() or
x = Console.ReadLine()
Console.Write(«format, »x) or
Console.WriteLine(«format, »x)
Console.Error.Write(«format, »x) or
Console.Error.WriteLine(«format, »x)
Xojo x = StandardInputStream.Read() or
x = StandardInputStreame.ReadLine()
StandardOutputStream.Write(x) or
StandardOutputStream.WriteLine(x)
StdErr.Write(x) or
StdErr.WriteLine(x)
Pajton 2.x x = raw_input(«prompt») print x or
sys.stdout.write(x)
print >> sys.stderr, x or
sys.stderr.write(x)
Pajton 3.x x = input(«prompt») print(, end=""») print(, end=""», file=sys.stderr)
S-Lang fgets (&x, stdin) fputs (x, stdout) fputs (x, stderr)
Fortran READ(*,format) variable names or
READ(INPUT_UNIT,
format) variable names[e]
WRITE(*,format) expressions or
WRITE(OUTPUT_UNIT,
format) expressions[e]
WRITE(ERROR_UNIT,format) expressions[e]
Forth buffer length ACCEPT ( # chars read )
KEY ( char )
buffer length TYPE
char EMIT
N/D
PHP $x = fgets(STDIN); or
$x = fscanf(STDIN, format);
print x; or
echo x; or
printf(format, x);
fprintf(STDERR, format, x);
Perl $x = <>; or
$x = <STDIN>;
print x; or
printf format, x;
print STDERR x; or
printf STDERR format, x;
Perl 6 $x = $*IN.get; x.print or
x.say
x.note or
$*ERR.print(x) or
$*ERR.say(x)
Rubi x = gets puts x or
printf(format, x)
$stderr.puts(x) or
$stderr.printf(format, x)
Windows PowerShell $x = Read-Host«« -Prompt» text»; or
$x = [Console]::Read(); or
$x = [Console]::ReadLine()
x; or
Write-Output x; or
echo x
Write-Error x
OCaml let x = read_int () or
let str = read_line () or
Scanf.scanf format (fun x ... -> ...)
print_int x or
print_endline str or
Printf.printf format x ...
prerr_int x or
prerr_endline str or
Printf.eprintf format x ...
F# let x = System.Console.ReadLine() printf format x ... or
printfn format x ...
eprintf format x ... or
eprintfn format x ...
Standard ML val str = TextIO.inputLIne TextIO.stdIn print str TextIO.output (TextIO.stdErr, str)
Haskell (GHC) x <- readLn or
str <- getLine
print x or
putStrLn str
hPrint stderr x or
hPutStrLn stderr str
KOBOL ACCEPT x DISPLAY x

^a Algol 68 dodatno kao "neformatirani" transput rutina: read, write, get i put.
^b gets(x) i fgets(x, length, stdin) pročitajte neformatirani tekst iz stdin. Korišćenje dobijanja se ne preporučuje.
^c puts(x) i fputs(x, stdout) napiše neformatirani tekst na stdout.
^d fputs(x, stderr) piše neformatirani tekst na stdout.
^e INPUT_UNIT, OUTPUT_UNIT, ERROR_UNIT su definisani u ISO_FORTRAN_ENV modulu.[14]

Argument vrednosti Argument računa Naziv programa / ime skripte
Ada[1] Argument (n) Argument_Count Command_Name
C (C99) argv[n] argc first argument
Objective-C
C++
C# args[n] args.Length Assembly.GetEntryAssembly().Location;
Java args.length
D first argument
JavaScript
Windows Script Host implementation
WScript.Arguments(n) WScript.Arguments.length WScript.ScriptName or WScript.ScriptFullName
Gou os.Args[n] len(os.Args) first argument
Swift Process.arguments[n] or
Process.unsafeArgv[n]
Process.arguments.count or
Process.argc
first argument
Common Lisp ? ? ?
Šeme (R6RS) (list-ref (command-line) n) (length (command-line)) first argument
ISLISP N/D N/D N/D
Paskal ParamStr(n) ParamCount first argument
Visual Basic Command[a] N/D App.Path
Visual Basic .NET CmdArgs(n) CmdArgs.Length [Assembly].GetEntryAssembly().Location
Xojo System.CommandLine (string parsing) Application.ExecutableFile.Name
Pajton sys.argv[n] len(sys.argv) first argument
S-Lang __argv[n] __argc first argument
Fortran DO i = 1,argc
CALL GET_COMMAND_ARGUMENT (i,argv(i))
ENDDO
argc = COMMAND_ARGUMENT_COUNT () CALL GET_COMMAND_ARGUMENT (0,progname)
PHP $argv[n] $argc first argument
Bash shell $n ($1, $2, $3, ...)
$@ (all arguments)
$# $0
Perl $ARGV[n] scalar(@ARGV) $0
Perl 6 @*ARGS[n] @*ARGS.elems $PROGRAM_NAME
Rubi ARGV[n] ARGV.size $0
Windows PowerShell $args[n] $args.Length $MyInvocation.MyCommand.Name
OCaml Sys.argv.(n) Array.length Sys.argv first argument
F# args.[n] args.Length Assembly.GetEntryAssembly().Location
Standard ML List.nth (CommandLine.arguments (), n) length (CommandLine.arguments ()) CommandLine.name ()
Haskell (GHC) do { args <- System.getArgs; return length args !! n} do { args <- System.getArgs; return length args} System.getProgName
KOBOL [b] N/D
^a Komandna linija u Visual Basic nije odvojena. Split funkcija Split(string) je potrebna za ih razdvaja.
^b standardni KOBOL ne uključuje bilo koji način za pristupanje komandne linije argumenata, ali zajednički kompajler-ekstenzije za pristup njima uključuje definisanje parametara za glavni program ili pomoću ACCEPT iskaz.

Izvršenje komandi

uredi
Shell komanda Izvršenje programa Zamena trenutnog programa sa novim izvršnim programom
Ada[1] Not part of the language standard. Commonly done by compiler provided packages or by interfacing to C or Posix.[15]
C system("command"); execl(path, args); or
execv(path, arglist);
C++
Objective-C [NSTask launchedTaskWithLaunchPath:(NSString *)path arguments:(NSArray *)arguments];
C# System.Diagnostics.Process.Start(path, argstring);
F#
Gou exec.Run(path, argv, envv, dir, exec.DevNull, exec.DevNull, exec.DevNull) os.Exec(path, argv, envv)
Visual Basic Interaction.Shell(command «WindowStyle» «isWaitOnReturn»)
Visual Basic .NET Microsoft.VisualBasic.Interaction.Shell(command «WindowStyle» «isWaitOnReturn») System.Diagnostics.Process.Start(path, argstring)
Xojo Shell.Execute(command «Parameters») FolderItem.Launch(parameters, activate) N/D
D std.process.system("command"); std.process.execv(path, arglist);
Java Runtime.exec(command); or
new ProcessBuilder(command).start();
JavaScript
Windows Script Host implementation
WScript.CreateObject ("WScript.Shell").Run(command «WindowStyle» «isWaitOnReturn»); WshShell.Exec(command)
Common Lisp (shell command)
Šema (system command)
ISLISP N/D N/D N/D
Paskal system(command);
OCaml Sys.command command, Unix.open_process_full command env (stdout, stdin, stderr),... Unix.create_process prog args new_stdin new_stdout new_stderr, ... Unix.execv prog args or
Unix.execve prog args env
Standard ML OS.Process.system command Unix.execute (path, args) Posix.Process.exec (path, args)
Haskell (GHC) System.system command System.Process.runProcess path args ... Posix.Process.executeFile path True args ...
Perl system(command) or
$output = `command` or
$output = qx(command)
exec(path, args)
Rubi system(command) or
output = `command`
exec(path, args)
PHP system(command) or
$output = `command` or
exec(command) or
passthru(command)
Pajton os.system(command) or
subprocess.Popen(command)
subprocess.call(["program", "arg1", "arg2", …]) os.execv(path, args)
S-Lang system(command)
Fortran CALL SYSTEM (command, status) or
status = SYSTEM (command)[a]
Windows PowerShell [Diagnostics.Process]::Start(command) «Invoke-Item »program arg1 arg2 …
Bash shell output=`command` or

output=$(command)

program arg1 arg2 …

^a Kompajler zavistan ekstenzije.[16]

Reference

uredi
  1. ^ a b v g d đ e ž z i j k l lj m n Ada Reference Manual - Language and Standard Libraries; ISO/IEC 8652:201x (E), http://www.ada-auth.org/standards/12rm/RM-Final.pdf
  2. ^ „Common Lisp HyperSpec (TM)”. Lispworks.com. Pristupljeno 13. 01. 2016. 
  3. ^ „Specification”. www.islisp.info. Arhivirano iz originala 22. 01. 2016. g. Pristupljeno 13. 01. 2016. 
  4. ^ a b „selected_int_kind in Fortran Wiki”. Fortranwiki.org. 30. 04. 2009. Pristupljeno 13. 01. 2016. 
  5. ^ „Types and Function Specifications”. Erlang. Pristupljeno 13. 01. 2016. 
  6. ^ „Advanced”. Erlang. Pristupljeno 13. 01. 2016. 
  7. ^ a b „8.5 The Number Type” (PDF). Pristupljeno 13. 01. 2016. 
  8. ^ a b „selected_real_kind in Fortran Wiki”. Fortranwiki.org. 30. 04. 2009. Pristupljeno 13. 01. 2016. 
  9. ^ „The GNU C Library: Complex Numbers”. Gnu.org. Pristupljeno 13. 01. 2016. 
  10. ^ „for each...in - JavaScript | MDN”. Developer.mozilla.org. 14. 07. 2015. Arhivirano iz originala 26. 05. 2013. g. Pristupljeno 13. 01. 2016. 
  11. ^ „for...of - JavaScript | MDN”. Developer.mozilla.org. 15. 12. 2015. Pristupljeno 13. 01. 2016. 
  12. ^ „Try-Catch for VB”. Sites.google.com. Arhivirano iz originala 16. 04. 2016. g. Pristupljeno 13. 01. 2016. 
  13. ^ „example”. Rosettacode.org. 15. 12. 2015. Pristupljeno 13. 01. 2016. 
  14. ^ „iso_fortran_env in Fortran Wiki”. Fortranwiki.org. 03. 05. 2009. Pristupljeno 13. 01. 2016. 
  15. ^ „Execute a system command”. Rosetta Code. 25. 11. 2015. Pristupljeno 13. 01. 2016. 
  16. ^ „SYSTEM - The GNU Fortran Compiler”. Gcc.gnu.org. Pristupljeno 13. 01. 2016.