Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : MICROMITE PLUS SD PROBLEM
Author | Message | ||||
OA47 Guru Joined: 11/04/2012 Location: AustraliaPosts: 875 |
I have been playing with a project on the mm plus E64 where I came to a problem accessing a small database on the SD card. The problem was that within the program I could access the file (32K) and count the records then when I close the file and re-open it later in the program I got an error of file not open. Looked at the MM build and it showed ver 5.03.02 so I decided to update to version 5.05.02. This all went Ok but now I cannot load the program as when I type LOAD "PROGRAM.BAS" I get Error: Invalid in a program. And this occurs no matter which file I try to load. Any guidance would be much appreciated. OA47 |
||||
SWA-Guy Newbie Joined: 01/02/2019 Location: GermanyPosts: 24 |
Hi, I have the same problem with my Explore 100 and ver 5.05.02. If I go back to ver 5.05.01 the "LOAD" command works correcly. I use the sd-card slot from the SSD1963 5" lcdpanel. Here my configuration: OPTION BAUDRATE 230400 OPTION COLOURCODE ON OPTION DISPLAY 24, 66 OPTION LCDPANEL SSD1963_5, LANDSCAPE, 48, 6 OPTION TOUCH 1, 40, 39 GUI CALIBRATE 1, 113, 3826, 2086, -1310 OPTION SDCARD 47 OPTION LCDPANEL CONSOLE Merry chrismas from Germany. |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 5867 |
You have found a bug. Geoff will probably be thinking "bah humbug!" The LOAD command was changed in V5.05.02 to create an error when trying to LOAD from within a program but it appears that things went astray a bit. From the change log: "Trying to use LOAD "file" in a program will now generate an error. LOAD "file", R is unchanged can be used both in a program and at the command prompt." I can confirm that LOAD "myprog.bas" from the command prompt does raise an error. LOAD "myprog.bas" ,R does load and run as expected. So, LOAD "myprog.bas" ,R followed by ctrl-C will get you there for now. Jim VK7JH MMedit MMBasic Help |
||||
OA47 Guru Joined: 11/04/2012 Location: AustraliaPosts: 875 |
Tassy Jim, thank you for the xmas present, I can now continue with the project over the next couple of days I have off. Merry Xmas Shedders OA47 |
||||
OA47 Guru Joined: 11/04/2012 Location: AustraliaPosts: 875 |
This one may slow me down a bit. When reading the data base with LINE INPUT, CC$ if the string has leading zeros then they are ommitted. Database entry 0000GOSH LINE INPUT READS CC$="GOSH" Curses, foiled again. OA47 |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3163 |
Bummer, and there I was thinking that V5.05.02 was near perfect. OK, after Christmas I will look into these reports. Thanks, Geoff Geoff Graham - http://geoffg.net |
||||
OA47 Guru Joined: 11/04/2012 Location: AustraliaPosts: 875 |
Thanks Geoff, sorry to interrupt your Christmas. I can wait until the new year. I might be able to modify the database to change the leading zeros. By the way the leading zeros in the string from the file is apparent in 5.03. OA47 |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 5867 |
Are the leading zeros chr$(0) or chr$(48)- "0" Jim VK7JH MMedit MMBasic Help |
||||
OA47 Guru Joined: 11/04/2012 Location: AustraliaPosts: 875 |
Jim, the string is saved as "00000HG1LH000V" but reads back in as "HG1LH000V". I have just been thru the database and changed each "0" to "O" and I will see if I can use it. OA47 |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 5867 |
This works for me: I'm supposed to be having my after dinner nap about now... Jim VK7JH MMedit MMBasic Help |
||||
OA47 Guru Joined: 11/04/2012 Location: AustraliaPosts: 875 |
Any thoughts on this one? [247] MID$(RP$,J,1)="1" Error: MID is not declared > ? J 5 > ? mm.ver 5.0502 |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3163 |
MID$() cannot be used as a command (ie, be assigned a value like PIN()). Some BASICs (I cannot remember which) did allow this but not MMBasic. Geoff Graham - http://geoffg.net |
||||
OA47 Guru Joined: 11/04/2012 Location: AustraliaPosts: 875 |
Thanks Geoff I shall soldier on. OA47 |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 5867 |
Someting like this: Jim VK7JH MMedit MMBasic Help |
||||
OA47 Guru Joined: 11/04/2012 Location: AustraliaPosts: 875 |
Thanks again Jim. I replaced the string with a number that held the appropriate values. OA47 |
||||
CaptainBoing Guru Joined: 07/09/2016 Location: United KingdomPosts: 1983 |
Just off the top of me 'ead: I think all the MS basics from GW onward supported MID$ as a statement (QB and VB defo) as well as Mallard Basic; which was used on the CPCs and the various CPM offerings from Amstrad (i.e. for Speccy+3, PCW etc). There was also a version of this for MSDOS. It is a rare enough requirement and easy to work round. all the best Edited 2019-12-30 20:20 by CaptainBoing |
||||
Print this page |