[SPIP] +2.1.12
[velocampus/web/www.git] / www / plugins / auto / spip-bonux / tests / balises / set_push.html
diff --git a/www/plugins/auto/spip-bonux/tests/balises/set_push.html b/www/plugins/auto/spip-bonux/tests/balises/set_push.html
new file mode 100644 (file)
index 0000000..74bc38e
--- /dev/null
@@ -0,0 +1,25 @@
+[(#REM)
+
+       la balise SET_PUSH sert a ajouter des valeurs dans un tableau #SET
+
+]
+
+[(#REM) 
+       SET GET|push = SET PUSH 
+]
+       #SET{A,#ARRAY}
+       #SET{B,#ARRAY}
+       [(#SET{A,[(#GET{A}|push{abc})]})]
+       #SET_PUSH{B,abc}
+       [(#GET{A}|!=={#GET{B}}|oui)[(#SET{err,"A et B sont différents"})]]
+
+
+[(#REM) 
+       SET_PUSH peut être fait sans declarer un SET prealable
+]
+       #SET_PUSH{C,abc}
+       [(#GET{A}|!=={#GET{C}}|oui)[(#SET{err,"A et C sont différents"})]]
+
+
+
+[(#GET{err}|?{ERREUR,OK}) #GET{err} ]