Re: 3 dimension array
- Posted by Derek Parnell <ddparnell at bigpond.com> Aug 22, 2002
- 393 views
----- Original Message ----- From: "Juergen Luethje" <jluethje at gmx.de> To: "EUforum" <EUforum at topica.com> Subject: Re: 3 dimension array > > Hello Derek, > > cool idea to put this stuff into a function. Well it does encourage "reuse" that way. > > function DIMArray( sequence Dimension, object InitValue ) > > sequence lNewArray > > So that the function works properly, when <InitValue> is an atom, > <lNewArray> should be declared as object, shouldn't it? > Yes, you are correct. Otherwise you would have to do something like ... if atom(InitValue) then lNewArray = {InitValue} else lNewArray = InitValue end if I'm not sure if there is any performance penalty in declaring it as object. ---------- Derek.