![]() |
Forum Index : Microcontroller and PC projects : Webmite - Library function
Author | Message | ||||
Nimue![]() Guru ![]() Joined: 06/08/2020 Location: United KingdomPosts: 411 |
Hi (Sorry for two posts in quick succession). I'm using the library function to store the boiler plate code for the webserver. Other than being an extra step if/when I need to update it - are there any negative implications in doing so? So far, all working fine -- just checking I'm not missing something. N Entropy is not what it used to be |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 4954 |
Hi N, Just make sure you keep the source code. Changing code in the library is not possible. Volhout PicomiteVGA PETSCII ROBOTS |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7681 |
I think LIBRARY SAVE should really be LIBRARY MOVE as there is no access to the code once it has been moved to the Library - it's gone from the editor. During the move it is also crunched, so all unnecessary spaces and all comments are stripped out. As Volhout says, it's important to keep your Library source code! I seem to remember that, as the Library code is still ASCII, you *can* actually get it back to change things. However, it's awkward and the code is pretty mangled - definitely not recommended. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
phil99![]() Guru ![]() Joined: 11/02/2018 Location: AustraliaPosts: 2508 |
The other option is LIBRARY LIST to the terminal then select/copy/paste to a file. All comments and unnecessary white space are removed. Command and Function names are restored from their tokens so it is still readable. If you do want comments to be preserved in the Library put them in a string variable. C$ = "I want this to stay" C$ = "...and this too." C$ = "now to recover the memory" ERASE C$ Edited 2025-06-05 18:17 by phil99 |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7681 |
The point in stripping stuff out of the Library code is to save space and speed things up. It would seem a bit counter-productive to create variables to store comments that have no useful purpose. :) Yes, you can do it, but it's more sensible to keep your editable source. LIBRARY SAVE literally saves the code, not the editable version. That's already gone by that stage. You have to make sure you save the source *before* using LIBRARY SAVE. I really do think that LIBRARY MOVE makes a lot more sense. LIBRARY DISK SAVE saves the current Library code to disk, in it's crunched form so it's still not (sensibly) editable. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |