Re: How to detect NULL input?



jane.sync@xxxxxxxxx wrote:
Is there a way to determine if the return key is pressed while waiting
for input? I tried to do something like the code below in the line "if
(LLT(str1,'')) then" where I was comparing "str1" to ''. The program
didn't read the enter key...

      function evaluateinput(str1) result(string)
      implicit none
      character(12) str1
      character(12) string
      if (LLT(str1,'')) then
        string = 'less than'
      else if (LGT(str1,'')) then
        string = 'greater than'
      else
        string = 'equal'
      end if
      return
      end


Once again, replace

character(12) str1

by

character(*) str1

....and you should be OK.

cheers,

Rich
.



Relevant Pages

  • Re: Performance RPG Figurative Constants versus Literals
    ... in compilation times between the two methods, ... I would suspect that the compiler would store *blanks as a single byte ... I would also suspect that comparing ... a 132 character string to a figurative constant would be quicker in the ...
    (comp.sys.ibm.as400.misc)
  • Re: A more efficient way
    ... > Is there a more efficient way of comparing a string to different words? ... the limit," 20.17's suggestion leads to hashing schemes which ...
    (comp.lang.c)
  • Re: if question
    ... >> performed before comparing. ... > and boolean is the simplest type. ... Why convert the string to boolean? ...
    (microsoft.public.scripting.jscript)
  • Re: (VWST) String includes: compare failure
    ... I don't think your problem is comparing instances of ISO8859L1String and ByteString. ... Contrary to many comparison methods that require that the two objects be of the same class or species, your two string classes need not be the same. ... address read from a POP3 server,the code allways fails to ... (eMailAddresses includes: (item eAddress) ...
    (comp.lang.smalltalk)
  • Re: Comparing Date values
    ... I am comparing two date values, one from a database and one that has ... been converted from a hard-coded string into an actual Date type. ... My IE4 here shows the lastModified string as "02/21/06 ...
    (comp.lang.javascript)