Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Mumps > Re: The `if' co...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 24 of 26 Topic 956 of 992
Post > Topic >>

Re: The `if' command

by Duke Normandin <dukeofperl@[EMAIL PROTECTED] > May 3, 2008 at 03:23 AM

On 2008-05-02, Pete <peter.charbonnier@[EMAIL PROTECTED]
> wrote:
> On May 2, 4:59 am, Duke Normandin <dukeofp...@[EMAIL PROTECTED]
> wrote:
>> On 2008-05-02, Pete <peter.charbonn...@[EMAIL PROTECTED]
> wrote:
>>
>>
>>
>> > On May 1, 5:05 pm, Duke Normandin <dukeofp...@[EMAIL PROTECTED]
> wrote:
>> >> On 2008-05-01, Rilian <no...@[EMAIL PROTECTED]
> wrote:
>>
>> >> > ****d references are bad - **** variables are encouraged.
>>
>> >> > Figure that one out.  8^)
>>
>> >> > Duke Normandin <dukeofp...@[EMAIL PROTECTED]
> wrote in
news:lFaSj.3318$PM5.2947
>> >> > @[EMAIL PROTECTED]
>>
>> >> >> Thanks for the great explanation! What is _your opinion_ of
>> >> >> "****d references" -- if you dare to go there. ;)
>>
>> >> You've _got_ to be sh....ing me!!
>> >> --
>> >> Duke Normandin
>>
>> > He is....a little.
>>
>> > Here's a quick explainer:
>>
>> >    SET ^Cars("pickup",1)="Tundra" --- * Full global reference  *
>> >    SET ^(2)="Rabbit"              --- * ****d global reference *
>>
>> So this implies that there pre-exists something like:
>>         SET ^Cars("compact",2)="Rabbit" ??
>>
>> >    SET ^(3)="ChevyS10"            --- * Assume subscript level 2 *
>>
>> as well as:
>>
>>         SET ^Cars("pickup",3)="ChevyS10"  ??
>>
>> >    SET ^(3,1)="ChevyS104liter"    --- * Go to subscript level 3  *
>> >    SET ^(2)="ChevyS106liter"      --- * Assume subscript level 3 *
>>
>> > So a ****d global reference is one where the fully qualified global
>> > name "^Cars("pickup"," is implied and can be called with just the
>> > caret and the subscript number.  You can see how ****d global
>> > references are unnessecarily confusing because they don't "spell it
>> > out" for the person reading the code.  You've got to pick back
through
>> > in order to see what you're referencing and it drives me nuts.
>>
>> Now I see how easily "****d References" could quickly produce spaghetti
>> code. But why use them at all? Is there a _speed_ advantage? Something
>> else?
>> --
>> Duke Normandin
>
> The Rabbit was technically a pickup, described in my global example on
> the same level as the S10 and the Tundra, with just a name.   In this
> example the logical extension would put:
>
> SET ^Cars("pickup",2,1)="RabbitLX"
>
> Where the LX was the version with the slightly larger engine.  I
> think.  I probably should have used a modern car reference.

Hey Pete....

Sorry! I wasn't critisizing your choice of models etc etc. I'm trying
understand the workings of Mumps, its database and subscripting and
indexing AND trying to figure what the hell a ****d reference is
vs a not-so-****d one. I made the wrong assumptions. So is _this_
correct:

SET ^Cars("pickup",1)="Tundra" --- * Full global reference  *

SET ^Cars("pickup",2)="Ranger"
SET ^Cars("pickup",3)="S10"
SET ^(4)="Sonoma"
SET ^(5)="F150"

So to my un-trained eye, the on;y way that I know that ^(4) "points"
to ^Cars("pickup", ) is the very close proximity of the context. 50
lines of code later, the context would not be so obvious. Secondly,
how do I know for sure that ^(4) does in fact still "point" to
^Cars("pickup", ) ?? Seems like using these "****d references" is like
"an accident waiting to happen",  no?
-- 
Duke Normandin
 




 26 Posts in Topic:
The `if' command
Duke Normandin <dukeof  2008-04-30 03:42:13 
Re: The `if' command
"Maury Pepper"   2008-04-29 23:04:08 
Re: The `if' command
Duke Normandin <dukeof  2008-04-30 11:57:42 
Re: The `if' command
"Maury Pepper"   2008-04-30 10:36:19 
Re: The `if' command
Rob Tweed <rtweed@[EMA  2008-04-30 21:27:44 
Re: The `if' command
Duke Normandin <dukeof  2008-05-01 03:09:48 
Re: The `if' command
"Maury Pepper"   2008-05-01 00:01:48 
Re: The `if' command
Duke Normandin <dukeof  2008-05-02 00:01:24 
Re: The `if' command
Duke Normandin <dukeof  2008-05-01 03:00:26 
Re: The `if' command
Philip Gage <philip@[E  2008-04-30 16:12:07 
Re: The `if' command
Duke Normandin <dukeof  2008-05-01 03:19:45 
Re: The `if' command
Rilian <noway@[EMAIL P  2008-05-01 07:32:10 
Re: The `if' command
Duke Normandin <dukeof  2008-05-02 00:05:07 
Re: The `if' command
"Maury Pepper"   2008-05-01 21:01:16 
Re: The `if' command
Pete <peter.charbonnie  2008-05-01 17:47:45 
Re: The `if' command
Duke Normandin <dukeof  2008-05-02 11:59:01 
Re: The `if' command
Aaron Seidman <aaron@[  2008-05-02 09:20:37 
Re: The `if' command
Duke Normandin <dukeof  2008-05-03 00:25:53 
Re: The `if' command
rodd@[EMAIL PROTECTED] (  2008-05-02 17:41:04 
Re: The `if' command
Duke Normandin <dukeof  2008-05-03 03:07:17 
Re: The `if' command
rodd@[EMAIL PROTECTED] (  2008-05-04 04:56:29 
Re: The `if' command
Duke Normandin <dukeof  2008-05-04 13:57:45 
Re: The `if' command
Pete <peter.charbonnie  2008-05-02 07:28:00 
Re: The `if' command
Duke Normandin <dukeof  2008-05-03 03:23:52 
Re: The `if' command
Rob Tweed <rtweed@[EMA  2008-05-03 12:07:07 
Re: The `if' command
"don" <faydo  2008-05-08 10:04:30 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 5:27:28 CDT 2008.