HP Forums
Define global varables - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Define global varables (/thread-4340.html)



Define global varables - rgallier - 07-11-2015 06:51 PM

If I have a program to define some global variables. How would I call that program from within another programs to use/define the same global variables? I have made a program that exports all of my global variables. I would now like to use them within the Solve & other apps without having to copy-paste them to all of the other programs.


RE: Define global varables - rgallier - 07-11-2015 07:03 PM

looks like this works:
Code:
EXPORT c,c₁,c₂;
EXPORT d,f;
EXPORT n;
EXPORT r,r₁,r₂,ρ;
EXPORT T₁,T₂,tk;
EXPORT α,δ,ε,ν,σ̛̛,ω,ф;
EXPORT τ,τ⒜,τ▿,τ⒰;
EXPORT γ,γ▵;

EXPORT global_vars()

BEGIN

INPUT({c,c₁,c₂});
INPUT({d,f});
INPUT({n});
INPUT({r,r₁,r₂,ρ});
INPUT({T₁,T₂,tk});
INPUT({α,δ,ε,ν,σ̛̛,ω,ф});
INPUT({τ,τ⒜,τ▿,τ⒰});
INPUT({γ,γ▵});
END;

Code:
EXPORT Solve()
BEGIN
EXPR(global_vars)


END;