![]() |
Forum Index : Microcontroller and PC projects : data in library
Author | Message | ||||
drkl![]() Senior Member ![]() Joined: 18/10/2015 Location: HungaryPosts: 102 |
Hello, Here is the begining of a code: (MM V5.0) 'LB-LOGGER.BAS 'PROGRAMBA: DIM MD(12),I DATA 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 FOR I = 1 TO 12: READ MD(I): NEXT I when I put it into library, I have got: >run [LIBRARY] For I = 1 To 12: Read MD(I): Next I Error: No DATA to read Without using the library the code works well. Where did I make a mistake? drk |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3303 |
From the user manual page 16: Don't worry that you did not see it. There is a lot in the manual to adsorb. Geoff Geoff Graham - http://geoffg.net |
||||
drkl![]() Senior Member ![]() Joined: 18/10/2015 Location: HungaryPosts: 102 |
Hi Geoff, Many thanks, the bad thing is, that I trasanslated the manual to hungarian... I forget it...Sorry The hungarian translation (to practice he hungarian ![]() • A könyvtárban használhatjuk a READ parancsot, de ez az alapértelmezés szerint a program memóriában elhelyezett DATA utasításban szereplő adatokat olvassa. Ha mégis a könyvtárban szereplő DATA adatait akarjuk kiolvasni, akkor az első READ parancs használata előtt a RESTORE parancsot kell kiadni. Ez a mutatót a könyvtár területre állítja. Many thanks again drk |
||||
drkl![]() Senior Member ![]() Joined: 18/10/2015 Location: HungaryPosts: 102 |
I have a newer problem: The beginning of a program in the library: restore DIM MD(12),I DATA 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 FOR I = 1 TO 12: READ MD(I): NEXT I '++++++[ DATE,TIME <> 64B KONVERZIOK]++++++++++++++++++++++++++++++++++ SUB DTESZT LOCAL K% ? DATE$: ? TIME$ PERCEK(K%): ? GETDATM$(K%): ? GETTIMM$(K%) MPERCEK(K%): ? GETDATS$(K%): ? GETTIMS$(K%) END SUB ' 'XXXXXX[ PERC ALAPU KONVERZIO ]XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX '******[ CALCULATE THE MINUTES SINCE MIDNIGHT 1ST JAN 2014 ]*********** FUNCTION GETMINS%(YR, MTH, DAY, HR, MIN) GETMINS% = (YR - 14) * (365 * 24 * 60) + ((YR - 13) \ 4) * (24 * 60) GETMINS% = GETMINS% + (MD(MTH) * (24 * 60)) I've got a error message: [LIBRARY] GETMINS% = GETMINS% + (MD(MTH) * (24 * 60)) Error: Variable not declared By my opinion the MD() is a global variable Without transferring the program to the library it operates well. Any help? drk |
||||
drkl![]() Senior Member ![]() Joined: 18/10/2015 Location: HungaryPosts: 102 |
Hi. I answer to myself, here is the solution SUB MM.STARTUP LB_INIT END SUB SUB LB_INIT RESTORE DIM MD(12) DATA 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 FOR I = 1 TO 12: READ MD(I): NEXT I END SUB drk |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |