Post Reply 
Setting up a HVar inside a program, IF it doesn't already exist.
04-16-2022, 11:25 AM
Post: #7
RE: Setting up a HVar inside a program, IF it doesn't already exist.
(04-15-2022 11:36 AM)matalog Wrote:  Yes, I follow now, thanks. The only thing is that this will require 2 copies of the List, at least when the program is running, and I expect this list to get very big.

Bonjour matalog

Dans les dernières versions du firware il y a 2 instuctions GET et PUT
qui permettent lire un élément ou de modifier un élément d'une variable
HVars de type liste.

GET(HVars("name"),pos) --> renvoie l'élément de position 'pos'
HVars("name"):=PUT(HVars("name"),value,pos) --> modifie l'élément de position 'pos' avec
la valeur 'value'
Vous pouvez également utiliser PUT(HVars("name"),value,pos)->HVars("name") (-> = sto>)
Ca fonctionne sur ma G2 en version 2.1.14588 (2021 05 05)

Hello matalog

In the last versions of firware there are 2 instuctions GET and PUT
which allow to read an element or to modify an element of a variable
HVars of type list.

GET(HVars("name"),pos) --> returns the element of position 'pos'.
HVars("name"):=PUT(HVars("name"),value,pos) --> modifies the element of position 'pos' with the with the value 'value'.
You can also use PUT(HVars("name"),value,pos)->HVars("name") (-> = sto>)
It works on my G2 in version 2.1.14588 (2021 05 05)

Translated with http://www.DeepL.com/Translator (free version)

Sorry for my english
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Setting up a HVar inside a program, IF it doesn't already exist. - Tyann - 04-16-2022 11:25 AM



User(s) browsing this thread: 1 Guest(s)