The two programs use CHAIN to go from one to the other. COM1 chains to program COM2 and runs it. The values in COM1 are transferred to COM2 because they are COMMON variables in each module. They don't have to be named the same, but both modules will require the SAME list by TYPE. IE: You cannot use a string variable in COM2 if it is a number type in COM1.
In COM1 you are supposed to enter STRING numbers as VAL is used to convert your entries to numbers. If you enter letters, VAL returns 0.
The average of the number values you entered will be displayed by COM2. The purpose of the demonstration is to show how to pass values between 2 modules using memory only. No files.
|Response Title||Author and Date|
|Com1_EX.bas||on Nov 19|
|That demo has nothing to do with COM ports. It is for COMMON.||Clippy on Nov 19|