The Art of Mathematics

Help 2.4.2

Memory Load command

1. Function

Use this command to load memory from file.

Fig. 1. Memory Load command in menu. Fig. 1. Memory Load command in menu. Fig. 2. Memory Load command in toolbar. Fig. 2. Memory Load command in Toolbar.

Command displays Open File dialog where you can select .lcm file to load. .lcm memory files consist of memory store commands like

3.7−>mem[height];

File is loaded directly into memory without displaying its content in the editor window.

Memory files allow you to separate calculation logic and input data, so that you can program your calculation formula once and then use it on different datasets.

2. Example

For instance you are designing some device with test chamber and interested how much gas you need to fill the chamber. Let us say you have two versions of the chamber: small and big. So, you create two files — chamber_small.lcm:

//   Small chamber sizes
.2−>mem[chamber height];
.31−>mem[chamber length];
.14−>mem[chamber width];

and chamber_big.lcm:

//   Big chamber sizes
.32−>mem[chamber height];
.54−>mem[chamber length];
.23−>mem[chamber width];

Now you create new file and type in the calculator:

//   Chamber volume
mem[chamber width]*mem[chamber height]*mem[chamber length];

To calculate small chamber volume load chamber_small.lcm file into memory and hit Ctrl+Shift+=. Calculator calculates small chamber volume:

//   Chamber volume
mem[chamber width]*mem[chamber height]*mem[chamber length]=0.008680000000000002;

To calculate large chamber volume load chamber_big.lcm file into memory and hit Ctrl+Shift+= once more:

//   Chamber volume
mem[chamber width]*mem[chamber height]*mem[chamber length]=0.039744000000000002;