![]() |
Forum Index : Microcontroller and PC projects : dim statements in mmbasic 4.5
Author | Message | ||||
Troyfa Newbie ![]() Joined: 23/01/2016 Location: AustraliaPosts: 9 |
Im new to these forums.. I bought a minimite kit from Jaycar.. it uses the 695F512 chip, which was pre programmed by silicon chip magazine... and had MMBasic 2.7b on it... The minimite, is just amazing... I'm really impressed with it.. I hooked it up to a few 7 segments displays and displayed stuff on them.. I use Linux on my computer, and I have been reading these forums to work out which software to use to update the firmware on the pics.. yeah there are a few Linux users here on the forums ![]() I updated MMBasic to version 4.5 for the Maximite/Minimite using mphidflash.. after the update I have noticed that the DIM statements aren't working for some reason.. heres a screen shot... ![]() 10 dim text( 4 ) = ( 1, 2, 3, 4 )
20 print text( 1 ) run 0 |
||||
Troyfa Newbie ![]() Joined: 23/01/2016 Location: AustraliaPosts: 9 |
Hey I just noticed MMBasic is written twice... |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6271 |
Hi and welcome to the forums and MMBasic V4.5 does not allow you to assign values to arrays when DIMing them DIM TXT( 4 )
FOR n = 1 TO 4 txt(n) = n NEXT n PRINT TXT( 1 ) TEXT is not a keyword in V4.5 but is used in later versions for the micromite. It would be safer to refrain from using TEXT as a variable name (but does not cause problems for now) You can forget about using line numbers. They still work in V4.5 but it is better to learn to leave them alone, the sooner the better. Seeing a double signon is not a problem, just a quirk of Linux and the USB-serial initialization. Windows users see that sometimes too. Jim VK7JH MMedit |
||||
Troyfa Newbie ![]() Joined: 23/01/2016 Location: AustraliaPosts: 9 |
I forgot to mention that when I edit code inside the built in editor.. it cannot save.. I press the F1 key, and it says... Do you want to discard changes (Y/N)... |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6271 |
I think minicom does things to the function keys. You can use other control keys instead. From the MMBasic manual: Jim VK7JH MMedit |
||||
ajkw Senior Member ![]() Joined: 29/06/2011 Location: AustraliaPosts: 290 |
I found that PuTTY is the only Terminal program on Ubuntu that will properly deal with the function keys. It will also display colour for Option Colour On in the later MM versions. If you need any help setting up PuTTY just ask. Anthony. |
||||
Troyfa Newbie ![]() Joined: 23/01/2016 Location: AustraliaPosts: 9 |
Thanks for that Jim.. yeah, that code works ![]() I also found some code that is quite interesting... dim txt( 4 )
data 10, 20, 33, 62 for n = 1 to 4 read txt( n ) next n Thanks for the tip about the line numbers... and the keys.. i will give them a try... thanks ajkw.. does it work in Linux? |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |