QforMortals3/Starting q

From Kx Wiki
Jump to: navigation, search

1.1 Starting q

Your installation of q should have placed the q executable in $HOME/q (or $QHOME) on Unix-based systems, or in the q directory on the c: drive on Windows.

For Windows, start a q session by typing q on the command line; for Linux-based systems use rlwrap q so that you will have command line recall. You should see a new q session with the Kx Systems copyright notice followed by the q prompt indicated by a leading q) on the command line. This is the q console. Type 6*7 and press Enter or Return to see the result.


Here the □ represents the cursor awaiting your next input.

Information.png In this document, sample q console sessions will always be displayed in fixed pitch font with shaded background. As a pedagogical device, in many q snippets we suppress the console response to an entered q expression, replacing it with an underscore. This means that you, the serious student, are expected to enter this expression into your own q session and see the result.
q) "c"$0x57656c6c20646f6e6521

You did do this, didn’t you? This is a tutorial.

Prev: Overview, Next: Variables

Reprinted with the author's permission from: q for Mortals Version 3, An Introduction to Q Programming by Jeffry A. Borror.

The book is available on Amazon. In the United Kingdom, it is available at Amazon UK.

©2015 Jeffry A. Borror/ q4m LLC

Personal tools