<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><category>pcsoft.us.windev</category><copyright>Copyright 2026, PC SOFT</copyright><lastBuildDate>15 Feb 2018 12:21:00 Z</lastBuildDate><pubDate>15 Feb 2018 11:57:00 Z</pubDate><description>WD22&#13;
&#13;
Hi,&#13;
&#13;
I have a global procedure, say GP_A, which calls another global procedure, GP_B.&#13;
&#13;
In GP_A I am declaring an integer variable called nVar1, giving it a value of e.g. 913. I then call GP_B passing nVar1 as a parameter. GP_B returns a result which is another integer signalling either success or failure of GP_B.&#13;
&#13;
So my code, in GP_A, reads&#13;
&#13;
nVar1 = 913&#13;
IF GP_B(nVar1) &lt;&gt; 0 then&#13;
//fail code block&#13;
End&#13;
&#13;
Info(nVar1)&#13;
&#13;
This code worked fine in WD15, but since I upgraded to WD22 the info statement returns a value of zero, i.e. nVar1 has been reset/overrriden somehow during the call to GP_B.&#13;
&#13;
Can anyone tell me why this might be happening?&#13;
&#13;
GP_B uses either Result 0 or Result -1 to terminate if that helps.&#13;
&#13;
Cheers&#13;
Reg</description><ttl>30</ttl><generator>WEBDEV</generator><language>en_US</language><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/64567-call-global-procedure-resetting-variable/read.awp</link><title>Call to Global Procedure resetting variable</title><managingEditor>moderateur@pcsoft.fr (El moderador)</managingEditor><webMaster>webmaster@pcsoft.fr (El webmaster)</webMaster><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/64567-call-global-procedure-resetting-variable-64570/read.awp</comments><pubDate>15 Feb 2018 12:21:00 Z</pubDate><description>Hi Aire,&#13;
&#13;
Your suggestion worked, many thanks.&#13;
&#13;
Regards&#13;
Reg</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/64567-call-global-procedure-resetting-variable-64570/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/64567-call-global-procedure-resetting-variable-64570/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/64567-call-global-procedure-resetting-variable/read.awp">Call to Global Procedure resetting variable</source><title>Re: Call to Global Procedure resetting variable</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/64567-call-global-procedure-resetting-variable-64569/read.awp</comments><pubDate>15 Feb 2018 12:15:00 Z</pubDate><description>Most probably you are passing nVar1 "by reference"&#13;
so your procedure looks like GP_B(nVar)&#13;
and you are changing the value of n…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/64567-call-global-procedure-resetting-variable-64569/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/64567-call-global-procedure-resetting-variable-64569/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/64567-call-global-procedure-resetting-variable/read.awp">Call to Global Procedure resetting variable</source><title>Re: Call to Global Procedure resetting variable</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/64567-call-global-procedure-resetting-variable-64568/read.awp</comments><pubDate>15 Feb 2018 12:11:00 Z</pubDate><description>Hi,&#13;
&#13;
Quote&#13;
SolutionJ-Reg&#13;
&#13;
Can anyone tell me why this might be happening? &#13;
&#13;
Not without seeing the REAL code, no...&#13;
&#13;
Be…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/64567-call-global-procedure-resetting-variable-64568/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/64567-call-global-procedure-resetting-variable-64568/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/64567-call-global-procedure-resetting-variable/read.awp">Call to Global Procedure resetting variable</source><title>Re: Call to Global Procedure resetting variable</title></item></channel></rss>
