<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="pt">
		<id>https://pt.arcowiki.com/index.php?action=history&amp;feed=atom&amp;title=Passando_vari%C3%A1veis_e_recursos_para_uma_macro</id>
		<title>Passando variáveis e recursos para uma macro - Histórico de revisão</title>
		<link rel="self" type="application/atom+xml" href="https://pt.arcowiki.com/index.php?action=history&amp;feed=atom&amp;title=Passando_vari%C3%A1veis_e_recursos_para_uma_macro"/>
		<link rel="alternate" type="text/html" href="https://pt.arcowiki.com/index.php?title=Passando_vari%C3%A1veis_e_recursos_para_uma_macro&amp;action=history"/>
		<updated>2026-04-12T13:24:09Z</updated>
		<subtitle>Histórico de edições para esta página nesta wiki</subtitle>
		<generator>MediaWiki 1.29.1</generator>

	<entry>
		<id>https://pt.arcowiki.com/index.php?title=Passando_vari%C3%A1veis_e_recursos_para_uma_macro&amp;diff=242&amp;oldid=prev</id>
		<title>Slia: Criou a página com &quot;When a Macro is created, it can receive from the DMIS program both '''Variables and Features''' as argument.&lt;br /&gt;  == Passing Variable to A Macro ==  In order t...&quot;</title>
		<link rel="alternate" type="text/html" href="https://pt.arcowiki.com/index.php?title=Passando_vari%C3%A1veis_e_recursos_para_uma_macro&amp;diff=242&amp;oldid=prev"/>
				<updated>2018-06-14T08:42:21Z</updated>
		
		<summary type="html">&lt;p&gt;Criou a página com &amp;quot;When a &lt;a href=&quot;/index.php/Macro&quot; title=&quot;Macro&quot;&gt;Macro&lt;/a&gt; is created, it can receive from the &lt;a href=&quot;/index.php/DMIS&quot; title=&quot;DMIS&quot;&gt;DMIS&lt;/a&gt; program both &amp;#039;&amp;#039;&amp;#039;&lt;a href=&quot;/index.php?title=Variables&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Variables (página não existe)&quot;&gt;Variables&lt;/a&gt; and Features&amp;#039;&amp;#039;&amp;#039; as argument.&amp;lt;br /&amp;gt;  == Passing Variable to A Macro ==  In order t...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Página nova&lt;/b&gt;&lt;/p&gt;&lt;div&gt;When a [[Macro]] is created, it can receive from the [[DMIS]] program both '''[[Variables]] and Features''' as argument.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Passing Variable to A Macro ==&lt;br /&gt;
&lt;br /&gt;
In order to '''pass a [[variable]] to a [[Macro]]''' it is necessary to define in the [[macro]] declaration that the argument is a [[variable]]:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;span style=&amp;quot;color: green; text-decoration: none;&amp;quot;&amp;gt;$$ Example of a MACRO Used with Variable&amp;lt;/span&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;M(PASSING_A_VARIABLE)=MACRO/MYVARIABLE&amp;lt;br /&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;	DECL/LOCAL,CHAR,128,tmpString&amp;lt;br /&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;	tmpString=ASSIGN/CONCAT('The Variable Passed is: ',STR(MYVARIABLE))&amp;lt;br /&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;	TEXT/OPER,tmpString&amp;lt;br /&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;ENDMAC&amp;lt;br /&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;DECL/DOUBLE,PASSED_TO_MACRO&amp;lt;br /&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PASSED_TO_MACRO=ASSIGN/100&amp;lt;br /&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;CALL/M(PASSING_A_VARIABLE),100&amp;lt;br /&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;CALL/M(PASSING_A_VARIABLE),PASSED_TO_MACRO&amp;lt;br /&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Passing Feature to A Macro ==&lt;br /&gt;
&lt;br /&gt;
In order to pass '''a featureto a [[Macro]]''' it is necessary to define in the [[macro]] declaration that the argument is a feature '''using the &amp;quot;'&amp;quot; in the declaration''' and, when calling the [[Macro]], '''use the &amp;quot;(&amp;quot; and &amp;quot;)&amp;quot;''' to inform that the feature has been passed.&amp;lt;br /&amp;gt;&lt;br /&gt;
In the [[Macro]] the feature '''is passed as object''', so it can be access directly.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;span style=&amp;quot;color: green; text-decoration: none;&amp;quot;&amp;gt;$$ Example of a MACRO Used with Feature passed directly&amp;lt;/span&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;F(P1)=FEAT/POINT,CART,0,0,0,0,0,1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;M(PASSING_A_FEATURE)=MACRO/'FEATURE'&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;	DECL/LOCAL,DOUBLE, XX&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;	XX=OBTAIN/F(FEATURE),3&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;	tmpString=ASSIGN/CONCAT('The X VALUE OF THE PASSED POINT IS: ',STR(XX))&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;	TEXT/OPER,tmpString&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;ENDMAC&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;CALL/M(PASSING_A_FEATURE),(P1)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Passing Feature to A Macro Using a Variable==&lt;br /&gt;
&lt;br /&gt;
In order to pass a '''feature to a [[Macro]] using a [[Variable]]''' it is necessary to define in the [[macro]] declaration that the argument is a [[Variable]] (see above) and, when using the [[Macro]], '''use the &amp;quot;@&amp;quot; to access to the feature''' as [[variable]]:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;span style=&amp;quot;color: green; text-decoration: none;&amp;quot;&amp;gt;$$ Example of a MACRO Used with Feature passed as Varible&amp;lt;/span&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;F(P1)=FEAT/POINT,CART,0,0,0,0,0,1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;M(PASSING_A_FEATURE)=MACRO/FEATURE&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;	DECL/LOCAL,DOUBLE, XX&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;	XX=OBTAIN/F(@FEATURE),3&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;	tmpString=ASSIGN/CONCAT('The X VALUE OF THE PASSED POINT IS: ',STR(XX))&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;	TEXT/OPER,tmpString&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;ENDMAC&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;CALL/M(PASSING_A_FEATURE),'P1'&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Passing Features and Variables to A Macro Using a Variable==&lt;br /&gt;
&lt;br /&gt;
A [[macro]] can '''receive as arguments both features and Variables'''.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case it is necessary to define in the [[macro]] declaration that the argument is a [[Variable]] or a Feature (see above) and, when using the [[Macro]], '''use the &amp;quot;@&amp;quot; or &amp;quot;(&amp;quot; and &amp;quot;)&amp;quot; to access to the feature or [[variable]]''':&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;span style=&amp;quot;color: green; text-decoration: none;&amp;quot;&amp;gt;$$ Example of a MACRO Used with Feature passed as Varible&amp;lt;/span&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;F(P1)=FEAT/POINT,CART,0,0,0,0,0,1&amp;lt;br /&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;F(P2)=FEAT/POINT,CART,1,0,0,0,0,1&amp;lt;br /&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;M(PASSING_A_FEATURE_AND_A_VARIABLE)=MACRO/'FEATURE_DIRECT',FEATURE_AS_VARIABLE,MYVARIABLE&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;	DECL/LOCAL,DOUBLE, XX&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;	DECL/LOCAL,DOUBLE, XX1&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;	XX=OBTAIN/F(FEATURE_DIRECT),3&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;	XX1=OBTAIN/F(@FEATURE_AS_VARIABLE),3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
::&amp;lt;code&amp;gt;	tmpString=[[Assign|ASSIGN]]/CONCAT('The X VALUE OF THE POINT PASSED DIRECTLY IS: ',STR(XX))&lt;br /&gt;
::&amp;lt;code&amp;gt;	TEXT/OPER,tmpString&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;	tmpString=ASSIGN/CONCAT('The X VALUE OF THE POINT PASSED WITH VARIABLE IS: ',STR(XX1))&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;	TEXT/OPER,tmpString&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;	tmpString=ASSIGN/CONCAT('The Variable Passed is: ',STR(MYVARIABLE))&amp;lt;br /&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;	TEXT/OPER,tmpString&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;ENDMAC&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;CALL/M(PASSING_A_FEATURE),(P1),'P2',100&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[it:Passaggio di variabili e funzionalità a una macro]]&lt;br /&gt;
[[zh-cn:将变量和特征传递给宏]]&lt;br /&gt;
[[pt:Passando variáveis e recursos para uma macro]]&lt;br /&gt;
[[de:Übergeben von Variablen und Features an ein Makro]]&lt;br /&gt;
[[es:Pasar variables y características a una macro]]&lt;br /&gt;
[[en:Passing Variables And Features To A Macro]]&lt;/div&gt;</summary>
		<author><name>Slia</name></author>	</entry>

	</feed>