Hi all,
As is known to everyone, in a Star Basic function, the variable of
default return value share the name of the function. For instance, I
tried these:
New calc doc ==> Tools --> Macros --> Organize Macros --> OOo-dev Basic...
Create a module under "My macros -> Standard" and add a function in it.
function reverse(str)
for i = len(str) to 1 step -1
*reverse*=reverse & mid(str, i, 1)
next i
end function
clearly, this function is to convert the sequence of a string.
Originally, I thought the variable "reverse" was a local variable. But
acctually, it was global.
Because after I used this function for several times, I noticed that the
result became the catenate of all the strings.
In my thought, the return value of function should be a local variable
rather than a global one. Any suggestions? TIA.
--
===========================================
Yuelin Zhuang -- Testing 3, RedFlag2000
MSN : [email protected]
E-mail: [email protected]
===========================================
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]