Welcome to jBASE's new documentation site! Many answers to your questions can be found by searching the Knowledgebase or viewing the jBASE Documentation. We also have a Google Group for peer discussion about jBASE. If you are unable to find the information you are looking for, jBASE Support will be glad to assist in resolving your technical problems. Enjoy and please provide comments and feedback .

How can we help you?

The '@' Function


The @ function is used to position the cursor to a specific point on the terminal screen.The function can be used as follows:

@(col{, row})


  • col and row can be any expression that evaluates to a numeric value.
  • col specifies, to which column on the screen the cursor should be moved.
  • row specifies which row (line) on the screen to position the cursor.

Specifying col on its own will locate the cursor to the required column on whichever row it currently occupies. The terminal address starts at (0,0), that being the top left hand corner of the screen.


When specified values exceed either of the physical limits of the current terminal, then unpredictable results will occur.

Cursor addressing will not normally work when directed at a printer. Building printer independence into a program can be achieved by accessing the terminfo database through the SYSTEM() function.

If the function is given a screen code as an argument as below: 


Where screen_code is any valid jBASIC screen code, the function can be used to control the behavior of the display screen. Screen color can also be controlled. For example: 

CRT @(-1):@(2, 30):"Hi there!":

The above can be used to clear the screen before the greeting "Hi there!" is displayed at the location specified by the second @ function.

Some valid screen codes are listed below: 

clear the screen and home the cursor.
home the cursor.
clear screen from the cursor to the end of the screen.
clear screen from cursor to the end of the current screen line.
move the cursor one character to the left.
move the cursor one row up the screen.

Other @ codes include: 

Current account
Call stack (i.e. if used in a subroutine)
For International mode
Carriage return
DATA input (e.g. when using EXECUTE)
Calendar day number of the month
Form feed character for printing
Used in I-type dictionaries
see @AM
Used in I-type dictionaries
EXECUTE level of nesting
For International mode
Operating system login name
Page height
Current month number
Current working directory
Process ID
Used in I-type dictionaries
see @IM
Item count from active select
see @SVM
Tab character
Current tty device
Operating system user ID
Operating system login name
jBASE port number
Current user statistics:

1> The port number

<2> The number of programs running in this port.

<3> Time the user started in Universal Co-ordinated Time or UTC  (not a dyslexic mistake). This is raw UNIX time. You can convert this to jBASE  internal time format using the U0FF0 conversion or to internal date format using  the U0FF1 conversion.

<4> The process ID

<5> Account name

<6> User name. Normally the operating system name.

<7> Terminal name in jBASE format

<8> Terminal name in Operating system format.

<9> Database name

<10> TTY device name

<11> Language name.

<12> Time in UTC the listening thread last found the thread  alive.

<13> Amount of heap space memory in free space chain on a  process wide basis. Not real-time, only updated every 15 seconds.

<14> Amount of heap space memory in use on a process wide basis.  Not real-time , only updated every 15 seconds

<15> Thread type as an internal integer.

<16> Type of thread as a text string.

<17> License counters

<18> Number of OPEN’s performed.

<19> Number of READ’s performed.

<20> Number of WRITE's performed.

<21> Number of DELETE's performed

<22> Number of CLEARFILE's performed

<23> Number of PERFORM/EXECUTE's performed.

<24> Number of INPUT's performed.

<25> Not used.

<26> Number of jBASE files the application thinks it has open at  the moment.

<27> Number of jBASE files actually opened by the operating  system at the moment.

<28> Any data set by the application using @USER.ROOT

<29> Process Identifier. A string created by the operating  system to identify the process. It is O/S specific. Currenly on IBM i-series  platform only.

<30> to <40> Reserved.

Attributes 41 onward are multi-valued, one value per perform  level, and there are <2> perform levels active.

<41,n> Program name and command line arguments.

<42,n> The line number in jBASE BASIC the program is currently  executing.

<43,n> The source name in jBASE BASIC the program is currently  executing.

<44,n> Not used.

<45,n> Not used.

<46,n> Status of program execution as a readable text string.

<47,n> Status of program execution as an internal integer.

<48,n> User CPU time . Depending upon the hardware this will be  either for the entire process or just the single thread.

<49,n> System CPU time.Depending upon the hardware this will be  either for the entire process or just the single thread.

<50,n> User CPU time used by any external child processes it  might have spawned.

<51,n> System CPU time used by any external child processes it  might have spawned.

<52,n> Any data set by the application using @USER.THREAD

Current year number

Go back to jBASE BASIC

Was this article helpful?