Sin[g^2](345+y)/5.

1234^123

1234^123.

Sin[3.4] * g[4.5] Exp[]

3+4

Plus[3,4]

x = 5

x = 6;

x

?x

?Set

Set[v,5345+65./54! Sin[Exp[e]]]

v

?v

{v1,v2}={-4,10}

{v1,v2}={v2,v1}

{a,b,c}={123,234,345};

a

b

c

{a,b,c}

{a,b,c}={c,a,b}

k=Pi;

v1=Pi k;    (* Set *)

v2:=Pi k; (* SetDelayed *)

{v1,v2}

k = 1/Pi;

{v1,v2}

?v1

?v2

v3[k_]:=Pi k

functionName[_]:=functionBody

f[argument_]:=argument^2

?f

f[16]

f[16.]

f[Pi]

f[pi]

f[Sin[3]]

f[Sin[3.0]]

f[Sin[3.]]

f[Sin[3]]//N

f[N[Sin[3]]]

f[Sin[N[3]]]

N[Sum[1/i^2,{i,1,Infinity}]]

NSum[1/i^2,{i,1,Infinity}]

f["paolo"]

f[Sin[]]

f[{1,2,w}]

?f

f[x1,x2]

f[{x1,x2}]

f[{x1,x2} k]

f[]

?f

f[x_,y_]:=(x+y)^2

?f

f[{1,2}]

f[1,4]

f[x_]:=x^3

?f

f[a_,b_,c_]:={a,b^c}

?f

f[4,3,s]

f[]:= "Nothingness"

f[]

f[] = "Nothingness without any global variables";

f[var]:=Pi^10

?f

f[var]

f[war]

var=10

f[var]

f["variable"]=Pi^E

f[variable]

f["variable"]

factorial

fact[n_]:=
If[n==1,1,n*fact[n-1]]

fact[6]

Clear[fact]

fact[1]=1;

fact[n_]:=n*fact[n-1];

?fact

fact[6.0]

fact[1.0]

fact[1.0]=1

?fact

f[6.0]

Clear[f]

f[n_Integer]:= n^2

f[x_Real]:= x^3

f[x_Symbol]:={x}

f[l_List]:=Length[l]

Complex, String, ...

f[6]

f[6.0000000000]

f[Pi]

f[{a,b,v,c,d,w,s}]

?f

f[geruovnsd]

f[arg_]:=everythingElse[arg]

?f

f[3+4I]

g[x_]:=generalDefinition[x]

g[x_Integer]:=x^2

g[c_Complex]:=Abs[c]

?g

h1[x_/; 0≤x≤5]:=x

h1[x_/;4≤x≤8]:=x^2

{h1[3],h1[4.5],h1[6]}

?h1

h2[x_/;4≤x≤8]:=x^2

h2[x_/; 0≤x≤5]:=x

?h2

{h2[3],h2[4.5],h2[6]}

Plot[{h1[t],h2[t]},{t,2,6}]

Clear[f]

test[num_]:=EvenQ[num]

{test[4],test[4.5]}

f[arg_/;test[arg]]:=Print["even!"]

f[arg_/;testOdd[arg]]

f[arg_]

f[3]

f[4.]

f[4]

?f

?g

Head[Pi]

Head[{1,2,3}]

List[1,2,3]

List[{1,2,3}]//Length

g1[x_]:=
If[Head[x]===Integer, x^2,
If[Head[x]===Complex,Abs[x],catchAll[x]]]

?Which

g2[x_]:=
Which[
Head[x]===Integer, x^2,
Head[x]===Complex,Abs[x],
True, catchAll[x]]

?Switch

g3[x_]:=
Switch[Head[x],
Integer,x^2,
Complex,Abs[x],
_, catchAll[x]]

{g[17],g1[17],g2[17],g3[17]}

{g[17 I],g1[17I],g2[17I],g3[17I]}

{g[Pi],g1[Pi],g2[Pi],g3[Pi]}