![]() |
Forum Index : Microcontroller and PC projects : CMM2: Undocumented (?) limit on number of items in a DATA statement
Author | Message | ||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4311 |
This was perplexing me whilst porting some BBC BASIC code. Try this on for size: Colour Maximite 2 MMBasic Version 5.05.05 Copyright 2011-2020 Geoff Graham Copyright 2016-2020 Peter Mather > list "test.bas" Dim x For i = 1 To 32 Read x Print x; Next i Data 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5 > run "test.bas" Error in line 3: Syntax The DATA line has 33 items, if you reduce it to 32 then it works. Best wishes, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
CaptainBoing![]() Guru ![]() Joined: 07/09/2016 Location: United KingdomPosts: 2170 |
works fine on a stock micromite > RUN 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 > ? mm.device$ Micromite MkII > |
||||
Chopperp![]() Guru ![]() Joined: 03/01/2018 Location: AustraliaPosts: 1097 |
Try using RESTORE first to reset the DATA pointer. Brian ChopperP |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4311 |
RESTORE makes no difference, and it shouldn't, the DATA pointer should already be set to the first piece of data if READ has never been called. Best wishes, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10315 |
Check the MMBasic implementation details in the manual and then split the data statement |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4311 |
Ever cryptic ![]() p46, Maximum number of arguments to commands that accept a variable number of arguments is 32 Thanks, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |