Playing with Procedures - Page 2


+ Reply to Thread
Page 2 of 2 FirstFirst 12
Results 16 to 21 of 21

Thread: Playing with Procedures30 days old

  1. #16
    Prolific Poster johngb's Avatar
    Join Date
    Oct 2003
    Posts
    2,154
    Thumbs Up
    Received: 95
    Given: 1
    Total Downloaded
    2.59 GB

    0 Not allowed!

    Default Re: Playing with Procedures

    @Les
    I will add Global to the list of Keywords. I am currently working on a big revamp of Studio which will provide true docking and floating windows. As this might take some time I will try and get an updated version of the current release out with the global amendment.
    JohnB

Attention

This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

The advertisements we display are relevant to this web site and your browsing history

Please consider supporting us by disabling your ad blocker.


Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

If you can, please report issues in the forum area WebSite / Forum Issues


Thank you for your attention.

  • #17
    Fanatical Contributor Tim's Avatar
    Join Date
    Jan 2003
    Posts
    7,674
    Thumbs Up
    Received: 47
    Given: 95
    Total Downloaded
    1.32 GB

    0 Not allowed!

    Default Re: Playing with Procedures

    From the little I know by talking to someone who wrote a compiler that handles "proper" procedures and local variables.

    The compiler has to follow the paths of calls etc to see if a variable is used another sub. If it does then it will assign is its variable. It's never a PIC (tm) related issue.

    The compiler by said writer is very powerful and can do fantastic work. However it ends up using a lot of variables to start with. But then if you have 1000 variables and using 500 for a small program really makes no odds. In larger programs it comes into its own.

    I am a useless coder and only get stuff done using the brute force method. EG keeping pounding away at it until I understood what I was doing and get the job done. Its very time consuming and means I'm very limited in my knowledge. I put the effort into learning Proton and really love it. Procedures to me at my level just make the code look nice and neat, there is no other advantage. I never write reusable code blocks as I just never code enough to warrant the effort. Also variable usage is never an issue. I always have loads spare.

    The one time I did have to worry about code space and variables I just looked through the ASM to see what lines took the most space and rewrote my code line to make it smaller. Also variables I use bTemp1, bTemp2 etc (the prefixing variable type is fantastic, thanks for that tip Les!). If I jump to another routine I just remember what variables I used in the previous one. As I said I write every time from scratch.

    One last thing the really big code job was so tight no other compiler would have managed it. Proton is really really tight. No other compiler will match it.
    Tim

  • Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  • #18
    Fanatical Contributor top204's Avatar
    Join Date
    Feb 2002
    Posts
    3,397
    Thumbs Up
    Received: 290
    Given: 141
    Total Downloaded
    1.68 GB

    0 Not allowed!

    Default Re: Playing with Procedures

    You are correct Tim, Dave's compilers are very good. I actually wrote the backend code generator for Swordfish for him, but the later Raptor compiler uses Microchip C compilers as the backend code generators, so their code generation is not so good. He did write a version of Raptor that used Proton and Proton24 as the backend and the code produced was excellent, and beat every other compiler on the market and was a fully procedural language.

  • Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  • #19
    Prolific Poster John Drew's Avatar
    Join Date
    Feb 2002
    Posts
    2,777
    Thumbs Up
    Received: 83
    Given: 34
    Total Downloaded
    4.30 GB

    0 Not allowed!

    Default Re: Playing with Procedures

    Tim's comments are spot on. I've never run out of variables. Like Tim I re-used bTemp1 etc within gosubs until Procedures came along.
    The current Procedure mechanism has made code easy to read and library capable. Truly local variables would be a nicety but it's of no use to us if our friend Les and his good wife have no way of paying the bills. I've had a look on the web and the only BASIC I can find for the Arduino is called quick BASIC and it seems to be an interpreted language. There is an opportunity in the Arduino world, especially if you only have one free device.
    So, in my opinion, an Arduino compiler needs to be a priority before true local variables. No, I don't have an Arduino and now I have an AMICUS18 I probably never will.
    John

  • Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  • #20
    Senior Member GAMBOA's Avatar
    Join Date
    Nov 2004
    Posts
    419
    Thumbs Up
    Received: 19
    Given: 0
    Total Downloaded
    203.73 MB

    0 Not allowed!

    Default Re: Playing with Procedures

    Hi,
    Time is finite, work hours are finite, resources are finite. So it is necessary to prioritize what we want. I don't want to press Les in one way or another. I trust Les's good judgment and I want him to direct the compiler.

    Regards,
    Gamboa

  • Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  • #21
    Fanatical Contributor top204's Avatar
    Join Date
    Feb 2002
    Posts
    3,397
    Thumbs Up
    Received: 290
    Given: 141
    Total Downloaded
    1.68 GB

    0 Not allowed!

    Default Re: Playing with Procedures

    The big problem with Arduino is that 99% of the users want everything for nothing, and with the Chinese imports, that is nearly the way of things. I was working on an AVR version of Proton, but cannot really see any financial benefit for the months of work required.

    They are just like Linux users, everything for nothing and don't care about quality!

    Unfortunately, the open-sorce trend has made users want, want, want for free but don't give a damn if it is absolute rubbish. This is also the way commercial companies are now operating, which is why modern electronic products are such dreadfully faulty or querky items. i.e. Alter open source code without knowing fully how it works and not actually knowing its flaws, and not re-submitting the changes back to the open sorce community for scrutiny, because it has been turned into a commercial item!
    Last edited by top204; 19th October 2019 at 21:07.

  • Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

    Thread Information

    Users Browsing this Thread

    There are currently 1 users browsing this thread. (0 members and 1 guests)

       

    Similar Threads

    1. Pickit 2 not playing fair
      By RGV250 in forum The Lounge
      Replies: 6
      Last Post: 27th April 2016, 18:28
    2. Procedures question
      By johngb in forum Proton 24
      Replies: 15
      Last Post: 10th March 2016, 12:01
    3. playing with serial comm's and unexpected results on GLCD
      By pe1pme in forum Proton Plus Compiler v3
      Replies: 0
      Last Post: 19th January 2015, 17:51
    4. Playing back recorded sound stored on pic
      By Tim in forum The Lounge
      Replies: 9
      Last Post: 14th February 2013, 22:48
    5. Playing with strings
      By AlbertoFS in forum The Lounge
      Replies: 1
      Last Post: 20th October 2009, 12:14

    Members who have read this thread since 2nd November 2019, 07:59 : 0

    Actions :  (Set Date)  (Clear Date)

    You do not have permission to view the list of names.

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts