Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated  Rate this Document

Why Is My MathScript Entity (MSF,MSC) Not Updating After I Change the Source?

Primary Software: MATRIXx
Primary Software Version: 6.3
Primary Software Fixed Version: N/A
Secondary Software: N/A

Problem: I am updating MathScript entity (MSF,MSC), but when I execute the function it seems the changes have not taken effect. Why aren't the functions updating?

Solution: MathScript entities (MSF,MSC) get compiled the first time they get executed or when you use the define command. XMATH actually executes the compiled version of the function. The problem you are seeing is most likely caused because the function is not getting recompiled with the changes.

Recompilation depends upon the setting of AUTOCOMPILE:

When you specify SET AUTOCOMPILE ON (the default), each time the program is called, Xmath checks the modification dates of the source file and the compiled binary file. If the source file is newer, Xmath recompiles the program and then executes it.

When you specify SET AUTOCOMPILE OFF, Xmath no longer performs the time stamp checking when you call the program. Therefore, the program is not recompiled. If you know that you will not be modifying a source file, this can improve the speed of a task such as calling an MSF in a loop.

To show the current setting of AUTOCOMPILE, execute the SHOW AUTOCOMPILE command.

Note: Built-in MathScript entities (such as bode) do not get checked for time stamps. It is not recommended that you change the built-in functions. If you want to modify built-in copy the file to a different directory and give the function a new name.If you modify a built-in entity you will need to use the define command to force a recompile of the function.



Related Links:

Attachments:





Report Date: 05/13/2004
Last Updated: 05/19/2004
Document ID: 39CAQBJ4

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit