Just to let you know - Page 3


+ Reply to Thread
Page 3 of 3 FirstFirst 123
Results 21 to 26 of 26

Thread: Just to let you know530 days old

  1. #21
    Prolific Poster towlerg's Avatar
    Join Date
    Mar 2012
    Posts
    2,155
    Thumbs Up
    Received: 74
    Given: 173
    Total Downloaded
    4.98 GB

    0 Not allowed!

    Default Re: Just to let you know

    I've always felt the macro approach was an unnecessary complication, I can see that it makes main code easier to read. But I do struggle reading other programmers macros. If using their code I usually convert the macros into other code solutions. There's more than one way to skin a cat.
    Couldn't agree more.

    parameters, preferably including genuine temporary variables
    IMO any attempt to add the full house of local, global, static et al parameters would be massive overkill.

    BTW I'm sure you noticed that you can have a return value and that the sub pops parameters in the reverse order.

    Obviously any attempt to over or under load is doomed to failure.
    Last edited by towlerg; 7th May 2018 at 11:04.
    George.

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.

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

    0 Not allowed!

    Default Re: Just to let you know

    From my very limited experience of a procedural language with local variables, It uses a lot of vars. Way more than I would use.

    The $define example I used while a little more of a pain to set up is very neat to use in practice.

    Probably the most important change I have made in my coding recently was to use better prefixes on my variables

    eg dim bTempByte1 as byte

    dim cNumber as 23

    In my code now I also use this
    $define TestButtons Gosub SubTestButtons

    SubTestButtons

    Return


    TestButtons ()

    In the code I write there is rarely never any need to pass parameters around
    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.

  • #23
    Senior Member SimonJA's Avatar
    Join Date
    Mar 2006
    Posts
    826
    Thumbs Up
    Received: 14
    Given: 16
    Total Downloaded
    889.46 MB

    0 Not allowed!

    Default Re: Just to let you know

    It sounds like the new subroutines would be very similar to the procedures in proton24 in all but name.

    I much prefer to use the proton24 procedures and find very little need for global variables or subroutines, it makes the code much easier to keep track of, especially going back to an older programs and it also makes it easier to reuse sections of code in new programs.

  • 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.

  • #24
    Prolific Poster joesaliba's Avatar
    Join Date
    Sep 2004
    Posts
    2,441
    Thumbs Up
    Received: 71
    Given: 26
    Total Downloaded
    5.63 GB

    0 Not allowed!

    Default Re: Just to let you know

    Can I call a Sub from another Sub, keeping in mind same rules that apply to Gosub and Return with regards to stack?
    Regards

    Joseph

  • 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.

  • #25
    Prolific Poster towlerg's Avatar
    Join Date
    Mar 2012
    Posts
    2,155
    Thumbs Up
    Received: 74
    Given: 173
    Total Downloaded
    4.98 GB

    0 Not allowed!

    Default Re: Just to let you know

    Of course you can. As long as each GoSub/Sub eventually executes a Return/EndSub the stack grows but remains balanced.

    Untill or indeed if Les adds parameters GoSub-Return and Sub-EndSub are functionally identical.
    George.

  • 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.

  • #26
    Prolific Poster joesaliba's Avatar
    Join Date
    Sep 2004
    Posts
    2,441
    Thumbs Up
    Received: 71
    Given: 26
    Total Downloaded
    5.63 GB

    0 Not allowed!

    Default Re: Just to let you know

    Thanks George.
    Regards

    Joseph

  • 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)

       

    Members who have read this thread since 13th October 2019, 09:27 : 0

    Actions :  (Set Date)  (Clear Date)

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

    Tags for this Thread

    Posting Permissions

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