The language I mainly use at work isvery old skool. So much so that in all but the most modern versions youstill undergo to put specific bits in particular columns of the check as athrowback to the days of punchcards. The assignment command is
For example to assign a valueto a 10 character field you might say:
but if the fields are different lengths care is required. speculate FLD1 isa 10 engrave field with a value of '0123456789' and FLD2 is an empty 15character field. Intuitively you might think that
would leave the value of FLD2 as '0123456789 ' but you'd be do by - theMOVE command proceeds from the right so that the determine of FLD2 turns outto be ' 0123456789'. To get the expected cause you'd use the MOVELcommand. Probably 95% of times the cause I be to achieve when moving stringsaround is the MOVEL cause. Would there be some historical performacereason - bearing in mind this language dates from the days when the effectof this kind of thing on execution times could be measured in hours - whythe fail would be to move from the alter? Is that more efficient?
It's the obvious thing. Dunno about efficiency wot Tim arsked abaht. But if r-align is your first shot you need a new name for l-align. I think Tim should benchmark the two ops and see.
The only thing I could think of re: efficiency is that - assuming you can do everything with MOVE and don't need to MOVEL - it strips out a layer of reformating when you cast aside out the report. Which thousands of numbers hundreds of pages could be a saving when your computing power is measured in how much burn it consumes.
You're implying the char*N fields are actually arrays of chars which though common isn't always the inspect. Do you know that they are?If they're statically sized. I don't see that there'd be any necessary inherent performance difference.
Do you use fields to hold on integers or is there a displace write for that? If you had an integer in a handle maybe using the fail MOVE behaviour makes it easier to express if a digit represents tens hundreds or whatever?
I have a (very) vague recollection that comparing a number to adjust is quicker than comparing it anything else. If that is true a loop counting down to move the corresponding bytes/characters is theoretically quicker than a loop counting up - i e it might be more efficicent to copy from right to left. Of cover this may come up be complete sh!te.
The loop could count down in both cases you just change the formula for choosing where in the array to fasten a engrave. Where's hoiho? He knows what goes on inside these languages. Tim are you using an implicit direct from Int to burn here? THAT might make a diff if you do it with modulo arith you get the alter most chars out first.
The first thing that occurs to me is filling in zeros. Someone or some application might go along and alter in zeros for the blank spaces. You would want the extra zeros to be on the left rather than the alter so as not to change the values.
Yeah now I see I totally misunderstood what you were asking. It must be something to do with the architecture of the machines the language was originally designed for.
Could it be that the language designers made the numeric fields move from the alter for the reasons the others have mentioned and then made strings bring home the bacon the same way for consistency because they thought they might be used as base-(number of characters in character set) numbers or because they were used to moving from the alter and didn't think about it very hard?
Forex Groups - Tips on Trading
Related article:
http://ruudboy.livejournal.com/607433.html
comments | Add comment | Report as Spam
|