Xref: utzoo comp.lang.fortran:5079 comp.os.vms:37470 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!jarthur!ucivax!orion.oac.uci.edu!biivax.dp.beckman.com!dsroberts From: dsroberts@biivax.dp.beckman.com Newsgroups: comp.lang.fortran,comp.os.vms Subject: Checking a string for an integer Message-ID: <1991Apr1.104227.243@biivax.dp.beckman.com> Date: 1 Apr 91 17:42:27 GMT Organization: Beckman Instruments Lines: 21 I would like to take a 3 byte string and find out if it contains only ascii digits for number or if letters were entered. On VMS, the DCL command would be result = f$integer (string) which would put the numeric equivalent in result, or return an error. I don't find an obvious way to do this in FORTRAN. Any suggestions? I am not averse to a VMS system service, btw. And, just in case I am missing some better alternative, what I am trying to accomplish is to find out if this 3 byte string contains a number in a valid range (in this case 1-254) or not. The only requirement is that I start with a 3-byte string. Pointers to the appropriate pages in the VMS FORTRAN manuals would be appreciated :-) -- --------------------------------------------------------------------------- Don Roberts Internet: dsroberts@beckman.com Beckman Instruments, Inc. Yellnet: 714/961-3029 2500 Harbor Bl. Mailstop X-12 FAX: 714/961-3351 Fullerton, CA 92634 Disclaimer: Always ---------------------------------------------------------------------------