example.q File Reference

Go to the source code of this file.

Functions

 f ()
 Identity function.
 g ()
 i (x)
 dotproduct (x, y)
 dotproductloop (x, y)

Variables

 x = 42
 Comments starting with a double slash are processed.
 y = "\"}" "\\"
 trade

Detailed Description

A sample documented q source file.

This q source file contains some example doxygen usage.

Date:
2007-01-25

Definition in file example.q.


Function Documentation

dotproduct ( x  ,
y   
)

Compute the dot product of 2 arrays

Parameters:
x an array
y another array
Returns:
x.y

Definition at line 36 of file example.q.

References x, and y.

dotproductloop ( x  ,
y   
)

Compute the dot product of 2 arrays

Parameters:
x an array
y another array
Returns:
x.y

Remarks:
Very un-q like!
Note:
Example only.

Definition at line 44 of file example.q.

References i(), x, and y.

f (  ) 

Identity function.

Definition at line 21 of file example.q.

References x.

g (  ) 

Simple function. Doesn't do much!

Returns:
the value 42

Definition at line 25 of file example.q.

i ( x   ) 

Identity function.

Parameters:
x a value
Returns:
the same value

Definition at line 30 of file example.q.

References x.

Referenced by dotproductloop().


Variable Documentation

Initial value:
([]
   time :   `time$();
   sym :    `symbol$();
   price :  `float$();
   size :   `int$()
)

A table of trades

  • time: the time the trade was made
  • sym: the the stock symbol
  • price: the traded price
  • size: the number of units traded

Definition at line 62 of file example.q.

x = 42

Comments starting with a double slash are processed.

a global variable

Definition at line 15 of file example.q.

Referenced by dotproduct(), dotproductloop(), _t::f(), _u::f(), f(), v::g(), _t::i::h(), and i().

y = "\"}" "\\"

Definition at line 17 of file example.q.

Referenced by dotproduct(), and dotproductloop().

 All Namespaces Files Functions Variables
Generated on Sun May 16 04:20:00 2010 for q/kdb+ by  doxygen 1.6.3