12.07.2015 Views

Intel® Fortran Libraries Reference

Intel® Fortran Libraries Reference

Intel® Fortran Libraries Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

2 Intel <strong>Fortran</strong> <strong>Libraries</strong> <strong>Reference</strong>Results:The result is of type INTEGER(4). The result is zero if successful, or –1 if an end-of-file wasdetected.CompatibilityCONSOLE STANDARD GRAPHICS QUICKWIN GRAHICS WINDOWS LIBSee Also: “GETCHARQQ”, “GETSTRQQ”Exampleuse IFPORTcharacter ans,errtxt*40print *, 'Enter a character: 'ISTAT = GETC (ans)if (istat) thencall gerror(errtxt)end ifGETCHARQQRun-Time Function: Returns the next keystroke.Module: USE IFCORESyntaxresult = GETCHARQQ ( )Results:The result type is character with length 1. The result is the character representing the key that waspressed. The value can be any ASCII character.If the key pressed is represented by a single ASCII character, GETCHARQQ returns the character.If the key pressed is a function or direction key, a hex Z'00' or Z'E0' is returned. If you need toknow which function or direction was pressed, call GETCHARQQ a second time to get theextended code for the key.If there is no keystroke waiting in the keyboard buffer, GETCHARQQ waits until there is one, andthen returns it. Compare this to the function PEEKCHARQQ, which returns .TRUE. if there is acharacter waiting in the keyboard buffer, and .FALSE. if not. You can use PEEKCHARQQ todetermine if GETCHARQQ should be called. This can prevent a program from hanging whileGETCHARQQ waits for a keystroke that isn’t there. Note that PEEKCHARQQ is only supportedin console applications.2-102

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!