| |
Dynamic procedure replacing
1. Create simple procedure named "Test1"
- Select "Application" tab.
- Define new procedure as follows.
| |
clear
procedure Test1(a, b)
myVal = a + b
return myVal
end
| |
|
|
|
|
- Click "Send to MF Application" button or Press "F5" key.
- Executed result:
2. Test procedure
- Type below script on the editor to test procedure.
| |
mySum = Test1(33, 55)
print "Sum is " + mySum
| |
|
- Click "Send to MF Application" button or Press "F5" key.
- Executed result:
3. Replace previous procedure
- Define new procedure having same name as follow.
| |
procedure Test1(a, b)
myVal = (a + b) * 10
return myVal
end
| |
|
- Click "Send to MF Application" button or Press "F5" key.
- Executed result:
- Above message shows previous procedure was updated with new.
4. Test updated procedure
- Test new procedure logic with same function call.
| |
mySum = Test1(33, 55)
print "Sum is " + mySum
| |
|
- Click "Send to MF Application" button or Press "F5" key.
- Executed result:
- Above result shows result of procedure was applied with replaced logic.
|