smeup / jariko

a JAva virtual machine Rpg Interpreter written in KOtlin
Apache License 2.0
65 stars 11 forks source link

Array definition with CTDATA error #327

Closed mattiabonardi closed 3 months ago

mattiabonardi commented 1 year ago

I defined a string array with CTDATA attribute and a DS.

D SHOWCASE        S            100    DIM(100) CTDATA PERRCD(1)          
  *
D ££SHOW          DS                                                                          
D  ££SCH                        10                                         
D  ££FUN                        30                                            
D  ££DSC                        59                                         
D  ££SVI                         1                                            

I fill the array directly at the end of the program:

** SHOWCASE ..+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ...+... 8 ...+... 9 ...+... 0
MU_250_01 Smeup entities                Smeup Entity management, navigation, CRUD                           
MU_250_02 Data access                   CRUD operations to sql/nosql database                      
MU_250_03 Iot integration               Events and actions towards IoT/IIoT                        
MU_250_04 Web service integration       Integration with external Web Services / Systems           1
MU_250_05 Application Events            Scheduling and event management                            1
MU_250_06 File system                   File System Management                                     1
MU_250_07 Debug                         Debugging functions                                        
MU_250_08 Cache management              Writing and reading variable from cache                    1
MU_250_09 Api Utility                   Example of usage Smeup's Api                               1
MU_250_10 Polyglotism                   Developing with different languages                        
MU_250_11 User management               Documentation of user management                           1

Each array field (SHOWCASE) defined at the end of the program should be length 100 characters but some lines aren't length 100 characters because I haven't fill all lines with white space.

If I assign an array field which haven't the length of 100 to ££SHOW DS I got the following error:

C                   EVAL      ££SHOW=SHOWCASE(1)
Issue executing EvalStmt at line 100. Asked startOffset=40, endOffset=99 on string of length 93

I think that if I define an array at the end of the program with length 100 and I didn't fill the remain characters with white space. Jariko can be fill them for me.

lanarimarco commented 3 months ago

Fixed