ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

anyone know what this is doing

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • anyone know what this is doing

    PHP Code:
    ~
                                                                              
    d bigstring       s           4096                                        
                                                                              
    d dqdata          ds                  qualified  inz                      
    d  WholeTomato                4096                                        
    d   OneSlice                    96    overlay
    (wholeTomato:1)              
    d   DataString                  40    dim(100overlay(WholeTomato:*next
    d    pro#                        7  0 overlay(dataString)                 
    d    counter                     3  0 overlay(dataString:*next)           
    d    itemqty                     7  0 overlay(dataString:*next)           
    d    heat                       12    overlay(dataString:*next)           
    d    labelqty                    4  0 overlay(dataString:*next)           
                                                                              
     /
    free                                                                    
                                                                              
        bigstring 
    = *all'01245';                                              
        
    dqdata.wholetomato bigstring;                                       
        *
    inlr = *on;                                                          
     /
    end-free 
    All my answers were extracted from the "Big Dummy's Guide to the As400"
    and I take no responsibility for any of them.

    www.code400.com

  • #2
    Re: anyone know what this is doing

    Predicting the National Debt in the year 2038?

    Comment


    • #3
      Re: anyone know what this is doing

      Well, short of the obvious that it is filling 2 large string variables with 01245, I really don't

      But you already knew that so I guess I'm no help
      Last edited by Red; May 10, 2007, 01:57 PM. Reason: typo

      Comment


      • #4
        Re: anyone know what this is doing

        Honestly,

        I would say it's demonstrating an Overlay of Dimensioned Array values over a huge @#%@#%@#% string.

        Comment


        • #5
          Re: anyone know what this is doing

          I find it hard to believe that this code is doing anything productive. Looks more like someone is trying to figure out how overlays and arrays work.

          Comment

          Working...
          X