[email protected] wrote: > I tried the following test program > > A = '1':@FM:'2':@FM:'3':@FM:'4':@FM:'5':@FM:'6':@FM:'7' > C = '' > DIM B(5) > MATPARSE B FROM A > MATBUILD C FROM B > RETURN > > The dynamic variable A contains 7 elements in it and i have defined a > dimentioned variable B with 5 elements in it, i am doing a MATPARSE > and expected the first 5 elements in A to be in B and when i did a > MATBUILD on B i can see all the 7 elements from A in C, > > When doing a MATPARSE the 6th and the 7th elements from A were stored > in the zeroth element of B > B(0) : 6รพ7 > B(1) : 1 > B(2) : 2 > B(3) : 3 > B(4) : 4 > B(5) : 5 > why is this happening, i was expecting only the first five elements in > the variable 'C', > is this the way it is supposed to work? > This is the way it is supposed to work. Any elements left over are stored in the last array variable. There are emulation flags to have this behave as does Reality OS or UniVerse or Pick etc. Unless you are using very large dynamic arrays or some specific logic that happens to benefit exceedingly, you will not really notice much difference in the performance. But, if you are stuck with doing this because of interfacing with other code, then make sure you DIM your array large enough, or make it a dynamic dimensioned array, count the FMs and redim it to the required number.
See the config_emulate files and whatever documentation you can find on the options if you want to change the behavior, but beware of creating a hybrid emulation - try to just deal with the emulation that the system is giving you. Jim > please help me on this. > > Vinod V > > > > --~--~---------~--~----~------------~-------~--~----~ Please read the posting guidelines at: http://groups.google.com/group/jBASE/web/Posting%20Guidelines IMPORTANT: Type T24: at the start of the subject line for questions specific to Globus/T24 To post, send email to [email protected] To unsubscribe, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jBASE?hl=en -~----------~----~----~----~------~----~------~--~---
