Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!cs.utexas.edu!rutgers!gatech!hubcap!grimlok From: grimlok@hubcap.clemson.edu (grimlok) Newsgroups: comp.lang.rexx Subject: MVS REXX, Rexx in general - efficiency questions Message-ID: <5805@hubcap.clemson.edu> Date: 20 Jun 89 14:53:40 GMT Organization: Clemson University, Clemson, SC Lines: 37 In an effort to learn Rexx and start a conversion of some very UGLY Clists, I have been writing some of the less ugly smaller clists in Rexx. Knowing that Rexx is interpreted, and knowing that our Reference manual is backordered, I encountered a few questions of efficiency which I am unable to answer. Here are a few: 1) Is copies(" ",80) any worse or better than copies(" ",40) or for that matter copies(" ",20)? The first is obvious that I want an 80 character string consising of blanks, it gets less obvious as we go down. Probably the best thing is to set a variable to a constant like spaces = " ...80 spaces..." but you have to split it up and it becomes unreadable and the chances of mis-counting are great. In short, how does copies() really work? 2) Given that the comparision x = y will give me the same results as x == y for the possible values of x and y in my program, is one "better" than the other? 3) Are logical operators short circuiting? That is, if I say: if x | y | z then ... and x is true, are y and z evaluated and or'd? If z is true 90% of the time and x and y only 20%, should I put if z | x | y then ... to save time, even though it is slightly less intuitive? I know from seeing select traced that when a when expression is true the other cases are bypassed. Thanks in advance. -- 'I just couldn't convince the voters that Dukakis was Greek for "Bubba".' -- Lloyd Benson explaining why the Democrats didn't carry Texas