Global variable
06-25-2017, 06:56 PM
Post: #1
 Powersoft Member Posts: 100 Joined: Feb 2015
Global variable
In this layout of my program I have 3 EXPORT procedures.
My main procedure is Plan13(t). I will need a lot of global variable.
How can I get the variable X in Plan13() as global for INITSAT() and
SATVEC().

Thanks for any help.

Code:
 EXPORT SET_OBSERVER() BEGIN END; EXPORT SET_TIME() // Set cime to calculate TSince BEGIN END; INITSAT() // Init Satellite BEGIN END; SATVEC() // Calc position and speed Satellite BEGIN print(X); // test END; EXPORT SET_TLE() // Set TLE variable in List L1 BEGIN   LOCAL YE,TE,IN,RA,EC,WP;   LOCAL MA,MM,M2,RV;   INPUT({YE,TE,IN,RA,EC,WP,MA,MM,M2,RV},"TLE",{"YE","TE","IN","RA","EC","WP","MA","MM","M2","RV"});   L1:={YE,TE,IN,RA,EC,WP,MA,MM,M2,RV}; //will be used in other routines END; //-------------sequence--------------- // 1. set TLE // 2. set time // 3. init Satellite // 4. do calations EXPORT Plan13(tsince) //Main programm BEGIN   LOCAL X;   X=10;   SATVEC(); // Calculate X,Y,Z,vX,vY,Vz END;
 « Next Oldest | Next Newest »

 Messages In This Thread Global variable - Powersoft - 06-25-2017 06:56 PM RE: Global variable - DrD - 06-25-2017, 07:46 PM RE: Global variable - cyrille de brĂ©bisson - 06-26-2017, 05:27 AM RE: Global variable - toml_12953 - 06-26-2017, 12:27 PM RE: Global variable - DrD - 06-26-2017, 11:48 AM RE: Global variable - Han - 06-26-2017, 03:09 PM RE: Global variable - DrD - 06-26-2017, 04:02 PM RE: Global variable - Han - 06-26-2017, 08:29 PM RE: Global variable - DrD - 06-26-2017, 09:04 PM RE: Global variable - cyrille de brĂ©bisson - 06-27-2017, 04:51 AM RE: Global variable - DrD - 06-27-2017, 11:32 AM

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