News:

  • May 05, 2026, 12:08:29 PM

Login with username, password and session length

Author Topic: REFWRITE feature request  (Read 13354 times)

plcnut

  • Hero Member
  • *****
  • Posts: 814
    • premiersi.com
REFWRITE feature request
« on: June 03, 2013, 01:59:40 PM »
I am learning to implementing REFWRITE in my current project, and have found the "Reference type" to be very clunky.
ie: go to System Configuration, click on Memory Configuration, scroll down list to find desired data type, check number, cancel the System Settings, Type number into box...

What I ended up doing: Take the structure name, and assign a symbolic constant to the same name. That way if you use the structure name without the index, you get the data type number.

The feature request would be: could you make this automatic? (when I create a structure you automatically make a symbolic constant with the same name as the structure).
Circumstances don't determine who we are, they only reveal it.

~Jason Wolthuis
Premier Systems Integration, LLC
http://premiersi.com

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6154
  • Yes Pinky, Do-more will control the world!
Re: REFWRITE feature request
« Reply #1 on: June 04, 2013, 02:08:18 PM »
Mixed emotions. As you are apparently preconditioned to do, you are again plumbing the depths of fringe Do-more features...I mean, REFWRITE, really?? ;) I woulda thought that virtually nobody would ever use that.

That's actually not a bad idea though, although it really shouldn't be named the same for reasons that won't be completely clear now, but will someday. Lemme think about it.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

plcnut

  • Hero Member
  • *****
  • Posts: 814
    • premiersi.com
Re: REFWRITE feature request
« Reply #2 on: June 04, 2013, 02:18:40 PM »
Bobo,
Offer me deeper levels of indexes for MATH Results and I would never touch REFWRITE again! That is the only thing I need it for. I'm trying to shorten code...
Circumstances don't determine who we are, they only reveal it.

~Jason Wolthuis
Premier Systems Integration, LLC
http://premiersi.com

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6154
  • Yes Pinky, Do-more will control the world!
Re: REFWRITE feature request
« Reply #3 on: June 04, 2013, 02:50:39 PM »
Can't do it...that's why we added REF() and REFWRITE...to specifically support those doing stuff like this. You're doing great...but since it is nearly always you exploring the boundaries of Do-more, it has become good sport here at Host to make light of that fact. ;)
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

plcnut

  • Hero Member
  • *****
  • Posts: 814
    • premiersi.com
Re: REFWRITE feature request
« Reply #4 on: June 04, 2013, 03:14:09 PM »
Oh well... I'm sure looking forward to the next release to see what else you've come up with ;)
One of these days I'll get out there to visit you guys and you'll find out just how much of a nut I am! ;D
« Last Edit: June 04, 2013, 03:39:38 PM by plcnut »
Circumstances don't determine who we are, they only reveal it.

~Jason Wolthuis
Premier Systems Integration, LLC
http://premiersi.com

plcnut

  • Hero Member
  • *****
  • Posts: 814
    • premiersi.com
Re: REFWRITE feature request
« Reply #5 on: June 04, 2013, 06:01:25 PM »
Would it really be all that deep to allow the Result of MATH to be a math expression in itself? That is all that I'm doing when I stack two MATH's on top of each other; the first calculating the result field for the second. (or maybe I should just keep doing what I've been doing...)
Circumstances don't determine who we are, they only reveal it.

~Jason Wolthuis
Premier Systems Integration, LLC
http://premiersi.com

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6154
  • Yes Pinky, Do-more will control the world!
Re: REFWRITE feature request
« Reply #6 on: June 04, 2013, 06:11:09 PM »
That's a little ambiguous. I'm going to need more to really understand what you are needing.

I suspect it comes down to you wanting multiple assignments within a single math box. I'm sure that we could create a math function that would assign a value to a variable and in turn leave the value of that variable on the stack. I would caution you, however, that you are likely trying to do too much at one time.

One of the favorite tricks of C programmers from yesteryear was to cram as much code into side-effects and inline assignments as possible. It's cool. It's efficient. It's also virtually unreadable and unsupportable...especially 5 or 10 or even 20 years later. Ask me how I know... :-\
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

plcnut

  • Hero Member
  • *****
  • Posts: 814
    • premiersi.com
Re: REFWRITE feature request
« Reply #7 on: June 04, 2013, 09:07:20 PM »
I'll take your word for it. I can keep doing what I have been, as well as integrating the REFWRITE wherever it can be used to simplify.
Thanks again! This is a grand little controller ;D
Circumstances don't determine who we are, they only reveal it.

~Jason Wolthuis
Premier Systems Integration, LLC
http://premiersi.com