Industry Online Support
Technical Forum
4/11/2009 7:57 PM | |
Posts: 90 Rating: (0) |
Hello, I would like to know the difference between items 1) and 2) inarray DB declaration ? 1) Array >byte [1..5] 2) Array >byte [0..4] Regards, Denker |
4/12/2009 1:38 AM | |
Joined: 10/7/2005 Last visit: 8/9/2024 Posts: 3016 Rating: (1054) |
Hello Denker no difference really, both Arrays are 5 bytes long and itentirely up to the user to choose arbitrary array start and end numbers to suit your purpose. In your case you'll addressthe first element of item1.) with L "DBname".Arrayname[1] and of item2.)with L "DBname".Arrayname[0] (i.e. you need to remember/know whatnumbering you use to ensureyou addressthe "correct"element of your array). Should you choose to do indirect addressing in STL you only "worry" about the absolute address in the DB and NOT/NEVER about the element number in the array. If you however choose to do indirect adressing in SCL youdo usean index value to reflect the element number in the array and again need to remember/know at which(arbitrarily picked)element number your array starts. I hope this helps Cheers Fritz |
Cheers |
|
4/13/2009 11:03 AM | |
Posts: 2348 Rating: (264) |
Please note, that 5 byte array uses 6 bytes (complex types are word-aligned). I' advice using 6 bytes array instead. |
Follow us on