modify const value

hanhan
edited October 2004 in FastScript
It seems like I have an odd request. I do not want some of my variables to be changed in the script. Let say I have a variable called second. Since it is system variable, I do not want the use to change the value. But I want to change it from my code. I know I can use functions for this purpose, but it is not good solution.
What I have found is :

fsScript2->Clear();
fsScript2->AddConst("denec","integer",kkk++);
fsScript2->Parent =fsGlobalUnit();
fsScript1->Parent =fsScript2;// fsGlobalUnit();
fsScript1->Lines = Memo->Lines;
fsScript1->SyntaxType = LangCB->Items->Strings[LangCB->ItemIndex];
if(fsScript1->Compile()==false)
{
ShowMessage(fsScript1->ErrorMsg);
}




and call the script like:
fsScript2->Clear();
fsScript2->AddConst("denec","integer",kkk++);
fsScript2->Parent =fsGlobalUnit();
fsScript1->Execute();

I think What I do is dangerous, but it works. Any better idea? Since I still have not purchased the code, may be I can add new methods to perform my needs?

Regards,

HAN

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.