A plea for some enhancements to the Proc command


+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Prolific Poster johngb's Avatar
    Join Date
    Oct 2003
    Posts
    2,171
    Thumbs Up
    Received: 96
    Given: 1
    Total Downloaded
    2.91 GB

    0 Not allowed!

    Default A plea for some enhancements to the Proc command

    Procedures could be so much more flexible if it were possible to have optional parameters.
    It would save having to have a number of procedures with similar names but different number of parameters.

    e.g.

    OSDestroyTask() ' Destroys current task
    OSDestroyTask(TaskID) ' Destroys named task

    If we could have optional parameters I could do this with one procedure whereas at present I have to have 2 procedures

    OSDestroyCurrTask()
    OSDestroyTaskByID(TaskID)

    In writing my RTOS project I could reduce the number of different OS commands by some 20% if optional parameters could be supported.

    Basically, it would require assigning a default value to a parameter. The compiler would still generate the parameter variables as normal but would give them their default value if that parameter is not passed in the call.

    The simplest syntax could look like this:

    Proc MyProc(Param1 As Word, Param2 as Word = $1234) as per the Delphi way

    or you could add an optional Keyword before the parameter.

    Proc MyProc(Para1 as Word, Optional Param2 As Word = $1234) - Visual Basic way.

    I would suggest to keep it simple that some basic rules are applied on parameter precedence:

    Mandatory parameters must be placed before optional parameters in the parameter list
    You cannot break the sequence of parameters in the parameter list when calling the procedure.

    e.g. if a proc has 1 mandatory parameter and 3 optional parameters

    MyProc(Param1, param2) would be legal with params 3 and 4 taking up their default value
    MyProc(Param1, Param2, Param3) would be legal with param 4 taking the default value
    MyProc(Param1, Param3) would not be legal

    It doesn't sound too difficult but only Les can really determine that.
    JohnB

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

  3. #2
    Fanatical Contributor top204's Avatar
    Join Date
    Feb 2002
    Posts
    3,517
    Thumbs Up
    Received: 319
    Given: 153
    Total Downloaded
    1.99 GB

    0 Not allowed!

    Default Re: A plea for some enhancements to the Proc command

    It is something that is on the list of "things to do" John, but it's a biggy, so it's going to take some time to complete it.

    I know it looks a simple process, but the underlying source code has to be, essentially, re-written for parameters.

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

  5. #3
    Prolific Poster johngb's Avatar
    Join Date
    Oct 2003
    Posts
    2,171
    Thumbs Up
    Received: 96
    Given: 1
    Total Downloaded
    2.91 GB

    0 Not allowed!

    Default Re: A plea for some enhancements to the Proc command

    Thanks, at least its on the to-do list, but I won't hold my breath, I doubt this would not be on many users wish list.
    It's a shame there aren't more users using the 16 bit platform, its much nicer to work on with far fewer inconsistencies.
    JohnB

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

  7. #4
    Member ricardourio's Avatar
    Join Date
    Jan 2007
    Posts
    218
    Thumbs Up
    Received: 6
    Given: 52
    Total Downloaded
    3.89 GB

    0 Not allowed!

    Default Re: A plea for some enhancements to the Proc command

    Hi JohnB,

    My main concern with 16 bit devices is the interface with 0-5V sensors that I use a lot and can be read directly with an 8 bit device. Using a resistor divider would introduce errors and non-desired impedances and/or inductances. I really don't understand why there are so few 5V compatible devices. As example, there isn't 16 bit 5V devices with more than 64 pins. You will find only 20, 28, 44 and 64 pin. Currently my main project uses two PIC18F87K22 (80 pin).

    Ricardo Urio

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

  9. #5
    Prolific Poster joesaliba's Avatar
    Join Date
    Sep 2004
    Posts
    2,532
    Thumbs Up
    Received: 75
    Given: 33
    Total Downloaded
    6.56 GB

    0 Not allowed!

    Default Re: A plea for some enhancements to the Proc command

    Quote Originally Posted by ricardourio View Post
    Hi JohnB,

    My main concern with 16 bit devices is the interface with 0-5V sensors that I use a lot and can be read directly with an 8 bit device. Using a resistor divider would introduce errors and non-desired impedances and/or inductances. I really don't understand why there are so few 5V compatible devices. As example, there isn't 16 bit 5V devices with more than 64 pins. You will find only 20, 28, 44 and 64 pin. Currently my main project uses two PIC18F87K22 (80 pin).

    Ricardo Urio
    Same here. The 5v issue put me off. Also sometimes the need for fewer pins, 14 / 16 pin are not available.
    Regards

    Joseph

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

  11. #6
    Prolific Poster RGV250's Avatar
    Join Date
    Aug 2005
    Posts
    2,356
    Thumbs Up
    Received: 29
    Given: 7
    Total Downloaded
    1.09 GB

    0 Not allowed!

    Default Re: A plea for some enhancements to the Proc command

    Hi John,
    I was not going to replay as I did not want to hijack the thread, basically I have tried but it was too much grief just to flash an LED. I think the lack of demo boards etc and reliable programmers also turned me off.
    I got a Firewing board but that kept failing, I think the bootloader kept getting overwritten and now it seems the long awaited Amicus24 board is not to be. Then there is the issue of getting the firmware back which was so unreliable as my Pickkit2 would work sometimes and not others. I was not going to be buying a new programmer just for them especially after the trouble they seem to be.
    Then to follow up there is the issue of DMA, I would love to get my CAN stuff ported over but I spent days looking for someone who could explain DMA access and all the forums I went on, no-one has managed it for the CAN registers so as far as I am concerned these things have put me off tem for life, life is just to short to waste on that.

    Regards,
    Bob
    Last edited by RGV250; 9th May 2017 at 15:02.

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

  13. #7
    Fanatical Contributor top204's Avatar
    Join Date
    Feb 2002
    Posts
    3,517
    Thumbs Up
    Received: 319
    Given: 153
    Total Downloaded
    1.99 GB

    0 Not allowed!

    Default Re: A plea for some enhancements to the Proc command

    I am looking into the Amicus24 Bob.

    I still think it is an excellent idea, and makes things so simple, and reliable to operate. It makes programming PIC24 or dsPIC devices so easy, it's incredible.

    I agree that the Microchip PICkit programmers are an absolute piece of crap! But, unfortunately, they have been pushed so much by Microchip, they are now normal crap. LOL. As is most modern day stuff. Cheap, made in China from rubbish components, then sold as a professional product, by sales teams who have no idea how it should work in the first place. Just look at Apple!

    Also, everything is a fabrication of the original manufacturers firmware, so problems in that firmware are followed through continuously, as the copy and pasters don't actually know, or care, what it going on, or how the interfaces work etc... Again, unfortunately, this is now the "in thing"

    OK... Rant over. I've always prided myself for creating products that are as professional as possible, and look, and act, like tools, not coloured desktops with cartoons for icons etc...
    Last edited by top204; 9th May 2017 at 16:51.

  14. 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. Bug in PROC that begin with T
    By GAMBOA in forum Proton Studio
    Replies: 1
    Last Post: 28th December 2018, 17:41
  2. Isr#s and Proc's
    By johngb in forum Proton 24
    Replies: 10
    Last Post: 25th February 2017, 09:41
  3. How to load an array Proc?
    By normnet in forum Proton 24
    Replies: 6
    Last Post: 11th April 2015, 13:24
  4. Plea for help
    By fanie in forum The Lounge
    Replies: 0
    Last Post: 14th October 2013, 11:13

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