Menu

Autosave implementation and a couple of others ...

2021-03-08
2021-03-09
  • Andrew Jameson

    Andrew Jameson - 2021-03-08

    Before the negative I can't begin to tell you how much that I have thoroughly enjoyed the "ride" so far. As a retired digital design engineer and software developer it is like discovering a new world of exploration and wonder.

    The "but" ...

    Maybe it's me and old bad habits but when a module is compiled it autosaves / overwrites the original source irretrievably. I was / still am a great Delphi devotee - perfect IDE and working environment - liked Pascal too !

    Delphi and nearly every other language IDE that I've every used allowed uninhibited "play mode" - compile, tweak, compile, more tweaking and then decide the original was OK - exit and all as was... not with GCBasic or indeed SimulIDE (another well crafted tool). Yes, i know behind the scenes, it uses a command line processor and needs a physical file but why can not that be a temporary "on-the-fly" copy ?

    I go back to the days of VAX / PDP-73's and PDP-8's DEC's EDT editor had an autoincrementing version numbering system - that idea might work ... but that too means that you still end up with a plethora of unwanted trial files and the obvious disaster scenario of losing the precious original as you can't see the wood for the trees.

    So is it me and I'm missing something obvious about "AutoSave" ?

    I concur with the something not quite right with nested IFs and ELSEs and I too have been unable to get close to defining when and how it happens ... now in the habit of a lot of testing in SimulIDE and looking at the assembler output. (I do recollect seeing a repeated loop label on one occasion.)

    Which neatly brings me to the last point. The little cryptic warning that pops up in a dialog that warns not to add trailing comments to lines using THEN (for the life of me I can not recollect how to see this dialog). This "nasty" does not feature in the Help. Also, surely it is fixable - I like commenting and where better but onward from tab 80 ? - and especially IF THEN statements !

    But it is amazing - so one very appreciative user and I am sure that I am not alone there !

    Kind regards

    Andrew Jameson

     
    • mkstevo

      mkstevo - 2021-03-08

      Ahhh... Delphi. (Swoon. Wistful smile.)

      I loved Delphi too.
      Object Pascal.
      The tightly defined procedures, which had to be pre-defined with all required parameters before they could be used in a program.

      Happy days...

      Not had any problem with nested If, Else, End If though. Apart from where I've been sloppy with my coding (which is every day really).

       
      • Andrew Jameson

        Andrew Jameson - 2021-03-08

        Here's the real power of Delphi : https://www.softspotsoftware.com/

        One day might revisit it ... every object breathed defined properties and procedures that gave life to everything ... a tile knew how to fly between owners ... that was 4 years of my life !

        Language choice was arbitrary but without object oriented language I'd not have succeeded - a wrapper around OpenGL.

         

        Last edit: Andrew Jameson 2021-03-08
  • Anobium

    Anobium - 2021-03-08

    Andrew. :-)

    Thank you! and it is good to get feedback.

    Re autosave.. this can be turned off. You simply edit the IDE parameters and then it will not save. See IDE Tools/Customise External Tools then for all those items.. change the 'save before' option.

    Re nested IF-ELSE... I have not seen this issue. If you have an example then do post and I can have a looksy.

    Re the odd comments on the THEN line. This works for me. I would recommend installing the latest release candidate, or, post an example.

    if this=1 then  'then comments
    
      wait 1 s
    
    else 'that
    
      wait 1 s
    
    end if
    
     
  • Andrew Jameson

    Andrew Jameson - 2021-03-08

    Thanks for the quick response - and it now does what I wanted - no save until I decide !

    I'll certainly let you now about IFy things !

    Cheers

     
    • Anobium

      Anobium - 2021-03-08

      Do install the release candidate software. This may resolve the 'then' issues.

       
  • Andrew Jameson

    Andrew Jameson - 2021-03-09

    Yes, tried those settings re:Autosave and IDE settings.

    It's as I thought - if you change the 'save before' configuration then the compiler faithfully does what it does and compiles the existing saved source file; therefore ignoring any changes that have been made in the editor or refusing to compile because there's no saved file.
    If you try Delphi, Lazarus, et al., you can create a new project, compile and run it without saving anything. Later you can edit any file, compile, execute and debug without any permanent edits hitting the disk until you're OK with the changes - the benefit is that there's no need to keep starting with a another copy of a project.
    So, unless I'm still mistaken, I begin with a new project copy - setting ´save before' to 'nothing' is more confusing as any edits are not incorporated into the hex file build and you end up thinking you've gone crazy - maybe true !
    Therefore, not a showstopper, but maybe a review for the future - "on the fly" temp file compilation ?
    I'll try the release candidate when I've time and give you feedback.

    As I said before, I'm really enjoying this new world, and it does remind me of my old DEC days - the safety net of a totally comprehensive, robust and finely honed compiler optimization was never there and work did involve choices as when to rewrite sections of code in assembler. It is the scripting support in GCBasic that made me aware of the absence of any checking and a few moments of madness when the calculated numbers made no sense. Yes the DEC days did not tolerate the style of programming that involved "trial and error" development - our projects in those days could take an hour or more to compile and link, certainly time for a lunch break ! (I can even go back to IBM360 batch processing where it could take a week before hundreds of punched cards gave a result of Syntax Error Line 70 and that was assuming the cards hadn't experienced a randomisation shuffle after they'd been dropped !)

    Must get on and stop the waffle !

    Thanks Andrew

     
  • stan cartwright

    stan cartwright - 2021-03-09

    I like gcb because it's basic and easiest free compiler I used since Delphi.
    Not a good comparison but for getting going and producing code is similarly simple.
    As gcb is a pic/avr basic compiler, there's not much to compare it to.
    Pics aren't pc's so why implement multi dimensioned arrays and other "basic" features?

    Gcb has changed in the 4 years since I started using it. I use pics but most of my stuff is on avr.
    ....So lots of work done improving gcb is not relevant to me. I have paid for pickit+ but that was really just a donate for a free avr basic compiler.

    The mistake I always make is look in demos for an example file and load may be change it and flash it. So messing up the demo folder :(

    Don't accidentally press the insert key as that will change editing and a pain until you know why.

    I've had nested if then go wrong to.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.