wherey

Returns the vertical position of the input cursor

Local Servers:nonblocking
Remote Servers:N/A
Classification:3.x, 4.x, 5.x, 6.x
Service:Screen Handling

Syntax

  #include <nwconio.h>  
   
  WORD wherey  (void); 
  

Return Values

This function returns the current row of the input cursor if successful. If an error occurs, it returns EFAILURE.

If an error occurs, errno is set to:

Value

Hex

Name

Description

23

(0x17)

ENO_SCRNS

Screen I/O was attempted when no screens were open.

Remarks

The wherey function returns the y coordinate of the current input cursor position (within the current screen). It also returns the output cursor’s position if cursor coupling for the current screen is enabled.

See Also

SetPositionOfInputCursor, wherex

Example

  #include <stdlib.h>  
  #include <nwconio.h>  
   
  main()  
  {  
     printf("%d,%d\r\n",wherex(),wherey());  
     getch();  
  }