Script language: how to delete an array

Asked by MrEndorphine

I have a strange problems when scripting.
I define an array and hand over the values at the same time. Then I use it. Then I see: Hey I made a mistake and change the content of the array in my script-code.

Now the problem is: Stellarium still works with the old values. Even afer closing Stellarium and reopening it. Somehow I guess I have to destroy the array before ending with the script code. (I vaguely remember. There was something like that in C++).

How do I do this? What is actually the programming language behind the scripting language and where can I see a documentation of the basic structures?

Thanks

Question information

Language:
English Edit question
Status:
Answered
For:
Stellarium Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Khalid AlAjaji (kajaji) said :
#1

changing the array content work with me.

I have test01.inc as:
HIP = new Array(length=2);
HIP[1] = 97649;
HIP[2] = 7588;

then the script changing HIP[1] to 1032 :

include("test01.inc");
HIP[1] = 1032;

core.selectObjectByName("HIP "+HIP[1], true);
StelMovementMgr.autoZoomIn(1);

will auto zoomin into hip 1032.

Can you help with this problem?

Provide an answer of your own, or ask MrEndorphine for more information if necessary.

To post a message you must log in.