t3d Primary Documentation
Now look again those previously shown training examples.
As you probably realize you have just learned key features of the t3d programming language
- funny feeling isn't it :) [Needless to say that doing those training examples
using (any) of the other programming languages, would probably require (months of studying the
particular language and) several days of coding.]
The t3d programming language
The structure of t3d function prototype
***********************************************************
langsign_mainverb_aaaaaa_bbbbbb_cccccc_dddddd_Reeeeee_
ADJECTIVE_PART1_n_ADJECTIVE_PART2_ARG1XXX_ARG2XXX_ARG3XXX
***********************************************************
Training examples 1
What does:
Training examples 2
How to:
Return value:
All t3d functions only return a 64bit signed integer number. All negative return values indicate errors each with respective error numbers. A returned zero means zero, all returned positive values do mean a meaningful correctly calculated numeric answer. In function which answers to yes/no kind of questions returned 0 = NO and 1 = YES.
Language identifier (langsign):
It is possible to implement t3d programming within programs written using many other programming languages; such as C , C++, PHP, Pascal, Python, Lisp, Cobol, Perl etc. The language identifier (langsign) is used in identifying the host programming language used inside the t3d structured function. The function contents must naturally be written using a particular host language, but one t3d structured function written with Ada should perform the same task as a similarly (except the langsign) named with host language PHP. Examples of used language identifiers:
t3d => t3d, C (also C++) => c3d, Pascal => p3d, PHP => ph3d,
Lisp =>l3d, COBOL => CO3d, Ada => a3d, Perl => pe3d
Main verb (mainverb):
There are 15 main verbs in t3d language. The mainverb defines the main category of action which the function will perform. Possible mainverbs are: add, ai, calculate, close, convert, create, crypto, environment, find, measure, move, open, read, remove and write.
Inputting (datatype) elements-part (aaaaaa_bbbbbb_cccccc_dddddd):
Each of the six letter strings (a-d) represents a data-parameter (of a certain datatype), which carries a parameter into the function. Order of inputting parameters is decided (in priority order) as follows (1) obvious direction <=> param1 goes-to param2, (2) age <=> first_young_param then_old_param, (3) size <=> first_smaller_data(type) then_bigger_data(type), (4) alphabetical order (aaa_param before bbb_param).
There are 20 different datatypes in t3d; byte, wbyte, int, long, double, bignum, barray, warray, iarray, larray, darray, bigarray, time, table, url, file, dirpath, gtable, gobject. Each datatype can carry different kind of data to / from function.
Datatype Descriptions:
Datatype
byte
Size 8-bits; can contain values 0-255
wbyte
Size 32-bits; can contain Unicode text (UTF-32)
int
Size 32 bits; can contain signed integers
long
Size 64 bits; can contain signed integers
double
Size 64 bits; can contain floating point numbers
bignum
Size unlimited. Bignums are barrays containing a number as text
barray
An array consisting of bytes, (optional use of delimiters included)
warray
An array (for Unicode text(UTF-32)) consisting of wbytes (use of delimiters allowed)
iarray
An array consisting of integers (use of delimiters included)
larray
An array consisting of longs (use of delimiters included)
darray
An array consisting of doubles (use of delimiters included)
bigarray
An array consisting of bignums (use of delimiters included)
time
High-resolution floating point presentation of seconds since Jan 1st year 0 (00:00am)
table
Like a SQL- table(rows, columns, headers); any datatype fits into each cells
url
Unique Resource Locator (internet address or any other exact location)
file
A (binary) file, max file length name is 4095 bytes
dirpath
Max size 4095 bytes, identifier path to a directory/folder
gtable
GUI-window with build-in menu-tree structures. Carrier of gobjects
gobject
GUI-object (like an unit in CSS);defines appearance and reflex-reactions of UI-units
process
Semi-independent program within a program; can also be a thread or external program
Result (data from function) - part (Reeeeee):
Also known as the R-parameter. The return value of t3d-functions is always an integer type number, so when a t3d- function needs to things to data in other datatypes, the results can not be returned as a return value. The result field of a function is described by a capital R. The datatype following the R will contain the result-data which is returned back from the function. Result data will be written to a datatype which is first given to a function using pass by reference or equivalent techniques.
How to do (the main verb) - part
Also known as the n-parameters. As earlier said there are only 15 main verbs in t3d. The main verbs of t3d do only define the rough action but when that rough action is fine adjusted with some extra parameters, the function is able to achieve very precise actions.
There can be max two adjective parts in each t3d structured function. A character combination _n_
(ADJECTIVE_PART1_n_ADJECTIVE_PART2):
Additional parameters a.k.a the X-parameters
In some cases the fine-adjustment of defining the main verb is not enough or the parameters
to function are too numerous for creating easy to use function names. In those cases the
X- parameters can be used in feeding data accurately into the function. The max number
of X- parameters per function is 10. Each individual X-parameter is identifiable by having
XXX at the end. When using the function, the X-parameters are to be inserted after the
R-part (result parameter outputting data from function). The order of these additional
parameters is the same as they are listed in function prototype. For example the following
are legal X-parameters LEVELXXX, PASSWORDXXX, WIDTHXXX_HEIGHTXXX, BITXXX, SENDERXXX_RECIPIENTSXXX_SUBJECTXXX_BODYXXX,
PRESSKEYXXX. The inner mechanism for inputting the X-parameters into functions are like
the typical mechanism for inputting variable arguments (varargs) into functions. X-parameters
should not be utilized using pointer- references to variables.
(ARG1XXX_ARG2XXX_ARG3XXX):