GrData v1.1


Copyright (C) 1998 Oleg Kobchenko


GUI Elements


The grddata program is suited for displaying the results of J expresions evaluating to rank 2 data. Rank 2 data in mathematics are called matrices. The cells of a matrix can be any non-enclosed J data of rank 0 or 1 that is scalars or vectors of numbers or characters.

Here are some examples of expressions producing the main rank 2 data classes:

   i. 3 4
0 1  2  3
4 5  6  7
8 9 10 11
   j./"1 i.3 4 2
  0j1   2j3   4j5   6j7
  8j9 10j11 12j13 14j15
16j17 18j19 20j21 22j23
   <"1 i.3 4 2
0 1 2 3 4 5 6 7
8 9 10 11 12 13 14 15
16 17 18 19 20 21 22 23
   {&a.65+i. 3 4
   3 4$nl 6
base j jprint jproject
jscriptdoc z base j
jprint jproject jscriptdoc z
   3 4$+`-`* 
+ - * +
- * + -
* + - *

GUI Elements


Displays the data. Each cell is one line tall. The width of each column is such that it will fit the widest cell in the column.

The grid has a border that enumerates rows and columns from 1 to the number of elements in each direction.

Scrolling is done with the keyboard and the scroll bars. See the respective sections for reference.

Scroll bars

Scroll the grid vertically and horizontally. Pages are implemented. The size of the vertical page is the number of visible lines. The vertical page is adjusted when resizing the window. Horizontal page is an approximation of average width and precise positioning should be adjusted by per-column scroll.

The scroll bars are coordinated with keyboard scrolling done in the grid.

Input line

Provides for entering the expression. It is a usual Windows edit control supporting all editing functions. Besides there is a combo box that holds some orignal examples and stores the user input in reverse order. Each entry in the combo box is unique.

Selecting from the combo box is done by either pressing [Down] or [Alt]+[Down], which opens the combo box. Also, selection can be done with a mouse.

Show button

Evaluates the expression and updates the grid. Scrollbars are initialized to the origin.

In case of error in the expression or if the data does not conform a valid rank 2 structure the user is prompted and the grid is restored to its previous state.

Help button

Displays this help file.

Status line

Contains a help/copyright string, the status indicator and the position of upper left corner or the size of the grid in pixels when resizing.


General   [Tab] Move around between the controls
    [Alt]+{letter} Activate the corresponding control
    [Esc] Close the program
Grid   [Up] Scroll one line up
    [Down] Scroll one line down
    [Left] Scroll one column left
    [Right] Scroll one column right
    [Home] Scroll to the 1,1 origin
    [End] Scroll to the lower right corner
    [Page Up] Scroll one page up
    [Page Down] Scroll one page down
Input   [Down] Select previous inputs
    [Alt]+[Down] Open combo box
    [Enter] Show the result of the expression


Is used to press buttons, direct focus to the input line, select text within the input line and operate the scroll bars. Mouse is also used to move and resize the window and close the program.


All files should be placed to a folder [j]/user/grdata or if you for some reason should choose a different folder then the PATH global variable should be modified and the project for runtime rebuilt. The .BAT file should also be changed in this case.

The program can be executed in two ways: from the session manager and as a run-time application.

The program is implemented as generic J in the sence that OOP is not used. This puts a limitation on the session manager version such that for consistent results only one copy of the program can run from one session manager. However, there is no limit for the number of session managers or runtime programs running at the same time.

File List

grdata.ijs Main program file. Used to run the program from the session manager and server the source of the runtime project
grdata.ijp The project file
grdrt.ijs The built runtime version of the program
grdrt.bat The trigger to run the runtime
grdata.html The help file
*.bmp *.gif *.ico Various graphics files

Contents | Objective | GUI Elements | Keyboard | Mouse | Notes