![]() |
Forum Index : Microcontroller and PC projects : [MMBASIC]Const arrays
Author | Message | ||||
Greg Fordyce Senior Member ![]() Joined: 16/09/2011 Location: United KingdomPosts: 153 |
@Geoff Would it be possible to extend the CONST command to include arrays? For example; CLS
Option base 1 Const cellid(6) = (4,5,6,7,8,9) For i = 1 To 6 GUI textbox cellid(i), 5+(i-1)*133, 85, 120, 50, RGB(red), RGB(gray) Next i At the moment I can use this, but I want to be able to refer to the controls in a FOR/NEXT loop as well. Because cellid is a variable there is a risk it could be inadvertently change; CLS
Option base 1 Dim cellid(6) = (4,5,6,7,8,9) For i = 1 To 6 GUI textbox cellid(i), 5+(i-1)*133, 85, 120, 50, RGB(red), RGB(gray) Next i |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3303 |
It should be possible (and easy) because constants and variables are closely related and share a lot of the same code. I will investigate. Geoff Geoff Graham - http://geoffg.net |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |