|
|
|
Passing Parameters By Value And ReferenceTCL has no types, everything is a string. SAAPHIRE is a C language API, so all parameters to the API's functions have types. Any C type whose value can be naturally represented by a string can be passed to SoftWish SAA procedures by value. For example, suppose there were some SAAPHIRE C function:
Then we could call this from SoftWish like this:
TCL and hence SoftWish, has no pointers. One passes a value by reference by passing the name of the variable containing that value. A C function like:
would be called from SoftWish like this:
Note that we can now also call:
with the same effect as our previous call to this function. There is no C data type for multi-character strings, so they must be passed by reference, like this:
There is no difference between the string representing a short, an integer and a long value nor is there a difference between the string representing a double and a float value. Consequently SoftWish does not distinguish between shorts, ints and longs, nor does it distinguish floats from doubles. See AlsoArrays Structures |
|
copyright Video-Collage Inc. |