Re: Proper way to return a string




Richard E Maine wrote:
Terence <tbwright@xxxxxxxxx> wrote:

For any string operation I always use a function call because this can
return an error code,

I've noticed that I usually disagree with almost every style preference
Terence expresses. If there is an exact opposite of his preference,
you'll usually be right in guessing that opposite to be my preference.
It applies here.

For me, returning an error code is a reason to avoid using a function.

Richard almost always seems to misunderstand the power of what I do, my
way.
For me, Fortran is a tool, not revealed truth.

The "error"code returned that I suggested is almost never a error
signal but an entry termination signal, and the code returned in
parallel with the string result, is the integer-2 keyboard code of the
last keystroke input, which allows signalling of function keys, pad
keys, return, tab and back-tab and so on. VERY useful!

Any insert and deletes are done internally before returning and not
signalled.

When testing for input on a test-or-wait basis, the return code says
either "no key" or "this is the key number and symbol code" (which an
be left in the buffer)..

Routines like this are the basis and underlying strength of our Text
User Interface for Windows programming, screen, keyboard and mouse
control, without expensive add-on software often needed to complete an
emasculated Fortran, - which wasn't MY fault, even though I worked on
early versions of it in IBM. I go to a different church from the
purists. We produce profitable tools for industry that are trusted to
work.

.



Relevant Pages

  • Re: Proper way to return a string
    ... I've noticed that I usually disagree with almost every style preference ... If there is an exact opposite of his preference, ... returning an error code is a reason to avoid using a function. ... I do have several basic string functions because they ...
    (comp.lang.fortran)
  • Re: count: natural or reverse
    ... To start the ball rolling and despite living in a reverse count part ... primarily I don't want to be signalling most of the time and it is ... provide is that they are playing an honest card from Hx and they don't ... hi-low carding is always meaningful (suit preference, ...
    (rec.games.bridge)
  • Re: Proper way to return a string
    ... you'll usually be right in guessing that opposite to be my preference. ... returning an error code is a reason to avoid using a function. ... I don't subscribe to the argument (no pun) that functions, in general, should not have side effects. ...
    (comp.lang.fortran)
  • Automatic updates crash
    ... Application Failure wuauclt.exe 5.8.0.2469 in wuaueng.dll 5.8.0.2469 offset ... Synchronization Error: Agent failed detecting with reason: 0x80248011 ... process exited with error 0xc0000005 before signalling ready event. ...
    (microsoft.public.windowsupdate)