× Discuss on Template programming, jBASE programming, Enquiries, No-File enquiry, Enquiry routines, Version, Version routines, Menus, Abbriviations, Creating local reference fields, Fast path enquiries, Creating charts and graphs, Generating Reports, Deal slips, Straight through processing, Multi Company and Multi Book setup, Tabbed screens, Composite Screens, T24 API, etc...

using dimensioned arrays

  • the_apache
  • Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 6 months ago #23575 by the_apache
using dimensioned arrays was created by the_apache
hi guys,

i would like to know how to declare dimensioned arrays at runtime, assign data at specific positions and then retrieving the data.
i have something like below, but i am getting "I" as output for all.

X = 2
Y = 3
DIM NEW.ARRAY(X,Y)

NEW.ARRAY<1,2> = 'H'
NEW.ARRAY<2,3> = 'I'
FOR V.Y = 1 TO Y
FOR V.X = 1 TO X
CRT 'Element #' : V.X : ',' : V.Y : ' is ' : NEW.ARRAY<1,X,Y>
NEXT V.X
NEXT V.Y

Please Log in or Create an account to join the conversation.

  • VK
  • VK's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Globus:G9-G13|TAFC:R05-R23|TAFJ:R19,R23,R24:test
More
3 years 6 months ago #23577 by VK
Replied by VK on topic using dimensioned arrays
Hi
use parentheses instead of angle brackets in assignment.

You can find small example at: jbc.temenos.com/pages/dimensioned_arrays.html
 

Cheers
VK

Please Log in or Create an account to join the conversation.

Time to create page: 0.034 seconds