Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: How can I get the current OP address (akin to PC)?

by CountZero (Bishop)
on Aug 18, 2012 at 19:40 UTC ( #988249=note: print w/ replies, xml ) Need Help??


in reply to How can I get the current OP address (akin to PC)?

What use would it be to know the B::OP Code address?

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

My blog: Imperial Deltronics


Comment on Re: How can I get the current OP address (akin to PC)?
Re^2: How can I get the current OP address (akin to PC)?
by rockyb (Beadle) on Aug 18, 2012 at 23:14 UTC
      I see. As I try to have only one instruction per line, I could not think of a good use for it.

      CountZero

      A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

      My blog: Imperial Deltronics

        Don't confuse Perl statements with B instructions.

        Again, if you reread carefully the thread cited on this Re^2: Identifying a location with finer granularity than a line number, you'll find the example:

        ($a/$b, $c/$d)

        If a "Runtime error: Illegal division by zero" occurs, one might like to know whether it occurred in the first expression in the array or the second.

        Now it is possible to rewrite this so there are more statements with fewer expressions and therefore fewer instructions in a statement and on a line. For example:

        my $exp1 = $a/$b; my $exp2 = $c/$d; ($exp1, $exp2);

        But I doubt many do this. Even here, there is more than one expression and instruction on a line.

        Second, this is isn't about you. To gain nirvana, one needs to become at one with the world which is not the same thing as changing the world to your level of enlightenment.

        I have read that there are some who work with code written by an unenlightened untouchable caste.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://988249]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (13)
As of 2014-07-28 18:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (206 votes), past polls