View function.xpx
<debug mode="normal">
<html>
<head>
	<title>TEST PHC VERSION $phcversion$</title>
</head>

<function name="f1" param="a">
	<set local="b" value="$a$">
	Dans f1 $param$ = $a$<br>
	<set local="a" value="#456786">
	$a$
	<set return="a" value="$a$">
	<set return="b" value="$a$">
	b=$b$<br>
</function>

<function name="f2" res="res">
	<set name="a" expr="$res$ * 2">
	<set name="res" value="200">
	$a$ ($res$)
	<cond expr="$a$ < 200">
		<function exec="f2" res="$a$"/>	
	</cond>
	$a$ ($res$)
</function>

<function name="f3" p1="default" p2="default">
	Dans f3 = $p1$ $p2$<br>
</function>

<!-- get dans une fonction pour test des variables locales -->
<function name="prout">
	<set name="monProut" value="a/b/c">
	<function exec="reprout" />
	prout = $monProut$ -> $x$ $y$ $z$ <br>
</function>

<function name="reprout" >
	<set name="monProut" value="d/e/f-2014">
	<get name="monProut" value="$monProut$" token="/">
	reprout = $monProut$ -> $monProut[monProut]$ ($monProut.count$)<br>
	<set name="monProut" value="$monProut[monProut]$">
	reprout = $monProut$ -> $monProut[monProut.count]$ ($monProut.count$)<br>
	<get value="$monProut$" format="$p$-$q$">
	reprout = $monProut$ -> $p$ $q$ ($monProut.count$)<br>
</function>

<function name="testa" a="">
	a -> $a$ <br>
</function>
<set name="a" value="#CCCCCC">	<!--Déclare la variable couleur gris-->

<body BGCOLOR="$a$">
	<a href="ViewFile.xpx?fileName=$phccurrentfile$">Voir le source</a>
	<br>
	a = $a$<br>
	exec f1(#660000)<br>
	<function exec="f1" a="#660000"/>			<!-- Change la variable -->
	Sortie f1 a =
	<table bgcolor="$a$"><tr><td>&nbsp;$a$</td></tr></table>
	<br>
	<hr>
	Puissance de 2 par récursivité :
	<function exec="f2" res="2"/>
	<br>
	<hr>	
	<function exec="f3" p2="New value"/>

	<function exec="prout" />

	<function exec="testa" />
<br>
$reprout$ / $testa$

</body>
</html>


	


20240502