PERSONAl C# PUBLIC METHODS
cm()
=========
CONTAINING CLASS: pcs only.
USE: Handling Controls
COMMON INPUT: cs = Control's key name (example:"bt0")
COMMON OUTPUT: (i,j,k) based GUV's reset.
Additionally, after execution of modes "i" all (o) based
var's, all general use arrays and all var's used for control's
setup or installation are reset.
Also, after execution of mode "s", var's used to supply data
for each mode are reset.
REMARKS: (1) CONTROL KEY NAMES: You select one for each control you
install.
It should be made of:
The 2-char name of the control + a number in the range (0-89)
The 2-char names can be:
Button:bt
CheckBox:cb RadioButton:rb Label:lb TextField:tf
TextArea:ta RichTextBox:rt ComboBox:ch ls:ListBox pn:Panel
Menu:mn
See "Buttons Groups" and "Menu's" for more naming rules.
(2) THE SEUP METHOD:
In your setup() method you supply the setup
data
for each control then call cm("i") to install the control.
Your setup data may include default values which you like to
suggest on the user. The variables used to assign default values
to are the same update var's which are used to return latest update
of each control to your program See "Update variables".See mode
"i" for all setup data.
(3) UPDATE VAR's: Used
by PC# to send updates to your program.
a) cus:
Used for single item controls. For controls which generate
text like text fields, cus=the text. For "on/off" controls like
buttons, cus="1" or "0" indicating "on" or "off". Check boxes only
have a third state which is "indeterminate" represented by cus="i".
b) cui: Used for multiple item controls where user can select one
item only, like Radio Buttons and Combo Boxes. It stores the index
of selected item.
CUS[]: Used for multiple item
controls where user can selsect more
than one
item. Like Check Boxes and lists. Each row of array CUS[]
can be "0" or "1" and in case of a Check Box, it can also be "i".
(4) BUTTON GROUPS:
Your program can include upto 10 CheckBox groups
and upto 10 RadioButton groups. Each group can include upto 10
buttons. Names should be as follows:
2-chr object name + group number (1:8) + button number (1:9)
For example: rb05=Radio Button number 5 in group 0.
and: cb21=Check Box Button number 1 in group 2.
All buttons are installed individually, can be modified
and their update status checked individually. However, You can
also check the update status for a group at once by using wild
card character, for example: cs="rb2*";cm("gu"); will get
the update for RadioButton group number 2. The update value
returned in this case will be the index of selected RadioButton in
the group assigned to (cui) In case of a check box, the update
value returned will be CUS[] as discussed before.
MODES:
Control's Installation:
i: USE:Install a control. This call
should come from the method setup()
IN: cs=Control's key name.
ps=Containing Panel's key name. if not specified, control will be
directly installed on the form.
j,k=loc.(Center of control
relative to Center of Form)
i,o=width,height of the
control.
cls=foregroung-background combined color code
for the control.
fns=Control's font code.
cis=Label's text
CIS[]=Items' text for a multi-item
controls.
os=label alignment os=c/e/w/n/s/ne/nw/se/sw=Alignment
direction.
ims=bckground Image file name.
cts=tooltip text (appears when placing mouse curser at control)
cms=Context menu (appears when right clicking the control)
cas=Anchor=n/s/e/w
cds=Dock=n/s/e/w/f
f=fill in all directions.
id=Tab index (control scan
order when pushing TAB's
starting
by 0) if id=-1 control will be skipped.
ob=editability.
For tf,ta & rt: ob=true:Read only.
ib=Other boolean
value. For tf: ib=true:means password txt field.
For Panels:ib=true: means scrollable.
For Menu's ib=true:MainMenu ib=false:ContextMenu.
You need to state ib value for the root menu of each group only.
Additionally you may include (cus), (cui) and/or CUS[] to set
default return values (See Remark concerning "Update Var's" above.
REMARK: See
"Common Output" for var's which are reset befor return.
Controls' setup:
REMARK: See "Common Output" for var's which are reset befor return.
sB: USE: Set bounds
IN: j,k,i,o=horiz, vert location & width, height
sA: USE: Set anchor
IN: cas=one or more of: n/s/e/w (the 4 directions)
sD: USE: Set dock
IN: cds=one only of: n/s/e/w or cds="f": fill.
sC: USE: Set color
IN: cls=Background-Foreground compound code
sF: USE: Set font
IN: fns=Font
sc: USE: Set rich text current color IN: cls=color
sf:
USE: Set rich text current font IN: fns=Font
sg: USE: Set background image IN: ims=Image
file name or ims="b":use (bip)
st: USE: Set tool tip
IN: cts=tooltip text.
sn: USE: Set TAB order IN: id=TAB order
for the comp. id=-1: Skip it
sl: USE: Set component label IN: cis=Label text.
sL:
USE: Set Add to list for multi-item controls IN: CIS[]=Items to add.
sa: USE: Set label alignment
IN: os=c/e/w/n/s/ne/nw/se/sw.
su: USE: Set (Force) an update value
IN : For tf,ta: cus=Update String. For cb, rb: cus="1" or "0" meaning
that the button should be selected or deselected.
For ch, (single select)ls: cui=Order of item to be selected.
For (Multiple select)ls:CUS[]. Each row contains "1" or "0" to
select or deselect its corresponding item.
For
bt: Calling cm("su") clicks the button (no value to supply)
sb: USE: Set bool value IN: ib=value
Meaning depends on control type.
for tf's ib=true:
means pswrd tf. (char's replaced with "*"'s)
for ls's ib=true: means Multi-selection ListBox.
for pn's ib=true: means Auto-Scroll Panel.
se: USE: Set editability IN: ob=value. For tf',ta,rt
ob=true: Rd only txt
sE: USE: Enable/Disable a control IN: jb=true: means Enable control.
sx:
USE: Set focus.
Reading Control's data:
gu: USE: Get last update (See Remarks)
OUT: cus=Current status, cui=index selected, CUS[]=cus for all elements
ge: USE: Get component
editability OUT: ob=true: Read only. For (tf,ta,rt)
gx: USE: Get focus status. True if focusd
OUT:ob
Other Operations done on Controls:
O: USE: Returns a reference to the control
object whose keyname is
supplied. The name of
the reference var returned is the present
object
name for the control type. Example: if cs="bt0" was
supplied, (btp) will be made a reference to bt0's object.
IN: cs=control's key
name
t: USE: Activate / Deactivate tooltTip
IN: ob=true: Activate it.
Operations done on Form:
REMARK: Whenever Form is resized, the default graphical device bitmap
(bio) is
automatically scaled to match it in size.
ft: USE: Set Form's title.
IN: os=Title's text
fv: USE: Make form visible/invisible.
IN: ib. ib=true: make invisible
fe: USE: Eliminate Form. Console will then be used for input &
output.
fcb: USE: Set form's background color. IN: cls=Color code
fcf:
USE: Set form's foreground color. IN: cls=Color code
ff: USE:
Set form's font.
IN: fns=Font code
fi: USE: Draw form's Background Image. IN: ims=Image
file.
fa: USE: Turn AutoScroll feature on/off. IN: ib. ib=true: turn it on.
fam:
USE: Set AutoScroll margins. IN: j=Horiz margin, k=Vertical
fs:
USE: Resize form to specified size. IN: j=new width, k=new height
fsf: USE: Resize
form to fill the screen.
fwc: USE: Get ClientSize Width.
OUT: of=Width in pixels.
fhc USE: Get ClientSize Height.
OUT: of=Height in pixels.
fws: USE: Get max (full screen) Width.
OUT: of=Width in pixels.
fhs: USE: Get max (full screen) Height. OUT: of=Height
in pixels.
fmm: USE: Attach a main menu to form's top. IN: cms=MainMenu key name.
fmc:
USE: Show Context menu at a location on form.
IN: cms=ContextMenu key name, j,k=Coordinates to show at.
Displaying Dialogs:
d: USE: Display text in (os) into display
dialog. Also returns a code
into (os) indicating
which button user has clicked.
IN: os=text to display js=Dialog title.
oc=Dialog's icon. can be:
(none/x/?/!/i), oc='
': means use (none)
ks=Keys selection. Can be (o/oc/ari/ync/yn/ri)
Meanings: o=okey
oc=okey & cancel ari=abort,retry
& ignore ync=yes,no & cancel
yn=yes &
no ri=retry & ignore ks="" means use (o).
OUT: os, os=(o/c/a/r/i/y/n) Meaning: User has clicked the button:
(ok/cancel/abort/retry/ignore/yes/no)
dfo: USE: Display Microsoft's "Open File" dialog and
obtain the name of the
file user has selected.
OUT: os=File name.
dfs: USE: Display Microsoft's "Save File" dialog and
obtain the name of the
file user has selected.
OUT: os=File name.
dtc: USE: Display Microsoft's "Color Selection" dialog
and obtain a
reference to the selected Color object.
OUT: clp=Color object ref.
dtf: USE: Display Microsoft's "Font Selection" dialog
and obtain a
reference to the selected Font object.
OUT: fnp=Font object ref.
_______________________________________________________________
dm()
=========
CONTAINING CLASS: pcs and pasp.
USE: Default applet's constants setup
COMMON INPUT: ls = mode
COMMON OUTPUT: (i,j,k)
based GUV's reset.
REMARKS: (1) If you call this method at modes "hg" or "hb" from method
init() before executing [base.init();], the values you supply
override the original default values.
MODES:
hg: USE: Sets the highest number of elements
a general use array can
handle.
IN: o = highest number allowed. A value of (o=0) sets the
original default number of (100) back
hb: USE: Sets the highest number of elements
byte or char general use
arrays can handle.
IN: o = highest number allowed. A value of (o=0) sets the
original default number of (1000) back (see Remark 1)
ht: USE: Sets the highest number of threads
which can be created.
IN: o = highest expected number. A value of (o=0)
sets the
original default number of (10) back (see
Remark 1)
ti: USE: Sets the default text input device
from which user's
texetual input is read.
IN: os = device code. Default value: "s". Possible values are:
s = System screen (Consol)
t = Text Screen input.
File name = A file you create, containing all
input necessary for your program in sequence.
to: USE: Sets the default text output device
to which all texetual
output is sent, unless specified.
IN: os = device code. Default value: "s". Possible values
are:
s = System screen (Consol)
t = Text Screen (A RichTextBox) created and managed
by PC#)
File name = A file to write all textual output to. If it does not
exist, will be created. If it exists, will be erased first.
p: USE: Get one of the initial parameters
(Arg's)
REMARK: Param numbers start by 1. (i=0) returns program name.
IN: i=param. number.
OUT: os=Param. value.
pc: USE: Get initial parameters count
OUT: o=Count.
REMARK: Minimum count is 1 since program name is always available
as parameter number zero.
Operations done on Console:
REMARK: Console width is the max number of char's per line.
Console height is the max number of lines it can contain.
ccb: USE: Set Console's background color.
IN: cls=Color code
ccf: USE: Set Console's foreground color. IN: cls=Color code
cs:
USE: Resize Console to specified size. IN: j=new width, k=new height
csf: USE: Resize Console
to fill the screen.
cwc: USE: Get Console's Current Width.
OUT: o=Width.
chc USE: Get Console's Current Height. OUT: o=Height.
cws:
USE: Get max (full screen) Width. OUT: o=Width.
chs: USE: Get
max (full screen) Height. OUT: o=Height.
_____________________________________________________________________________
fm()
=========
CONTAINING CLASS: pcs and pasp.
USE: Filing
COMMON INPUT: is = mode fls = File actual
name.
COMMON OUTPUT: (i,j,k) based GUV's reset.
REMARKS: (1) When you open a Sequencial Access File (SAF) you supply
the
file actual name in (fls) & file keyname
like "sf0" in (fs)
When you do any other operation
on the file, you supply the
keyname only.
Method fm() will obtain (fls) and other
informations
regarding the files from its own archives.
(2) When you open a Random
Access File (RAF) you do the same except
that reference
name in this case must start with "rf", like "rf0",
"rf1"
and "rf8".
(3) Maximum number of files
allowed is 90 (total). However, you can
select keynames
in the range (sf0:sf89) for your SAF's and any
keynames
in the range (rf0:rf89) for your RAF's.
(4) The boolean value (dnb)
"operation done indicator" is used
in filing to indicate
that "end of file" has been reached. So, it
should
be checked immediately after any read operation. If
found to be (true), there will be no more data to read.
(5) Remember to double the
back slashes in file names. C# uses the '\'
to identify
some special characters. For this reason, it expects
you to supply "\\" to mean "\". For example if your file path
was "C:\x.txt", supply its name as (fls="c:\\x.txt;)
GENERAL OPERATIONS ON FILES:
============================
MODES:
.: USE: Return current folder name in (os)
OUT: os
A: USE: Obtains file attributes.
IN: fls
OUT: os = one char (file attributes)
The character could be:
'space' = File name does
not exist.
'd' = Found to be a directory.
'f' = Found to be a File.
M: USE: Makes(create) a new file/directory.
IN: fls = file/directory name ks=type ks="f": File ks="d": Directory
C:
USE: Copy one file to another. Not for folders.
IN: fls = Source file name
os=Destination file name.
REMARK: If dest. file or directory exists, will always
overwrite.
D: USE: Delete File or Directory.
IN: fls = file/directory name ks=type ks="f": File ks="d": Directory
L: USE: Get File List (Dir)
IN: fls = directory name followed with "\\"
ks="d": Get sub-directories only. ks="f" (default): Get files only
OUT:
OS[100] containing the list.
O: USE: Get File Stream Object for a file
IN : fs=File Keyname OUT:fsp=Present FileStream Object ref.
s: USE: Access file search & browsing
IN: fls=Name of file to be searched fs=ref name (like "sf5")
c5=Last char. read.Supply "c5=-1" in 1st statemnt only to open file
js=String to skip ks=String to stop reading immediately before
j=Number of (js)'s to skip. If (js="" & ks="")
it
means number of char's to skip.
OUT: os=String starting after last (js) and
ending before start of (ks)
REMARKS: (1) If ks="", os="". File pointer will
move to desired
position
only which is immediately after (js).
(2) If js="", os=String starting at file pointer and ending
before the start of (ks)
(3) If (js="" & ks=""),os="". File pointer moves by (j) char's
SEQUENCIAL ACCESS FILES (SAF's):
================================
MODES:
or: USE: Opens a file for read only.
IN: fls=file name fs=ref name (like "sf0")
OUT: dnb=true: File is
empty. EOF reached.
oa: USE: Opens a file for append.
IN/OUT: Same as "or".
ow: USE: Opens a file for Read/Write. IN/OUT:
Same as "or".
rl or r:USE: Reads text line.
OUT: os, dnb=true: last data on file
ra: USE: Read all file.
OUT: os, dnb=true: last data on file
rb: USE: Read one byte.
OUT: o,os, dnb=true: last data on file
w: USE: Write text word.
IN: os
wl: USE: Write text line. IN: os
wb:
USE: Write byte IN: o
c: USE: Closes an open file.
RANDOM ACCESS FILES (RAF's):
============================
REMARKS: (1) RAF's can be with/without a header. To open a file without a
header you set ib=true and enter record length in (rcl) before
opening it. Your data starts at record zero in this case.
(2) RAF's
with headers, contain all necessary information about how to
read their records and fields at record zero. You don't need to
supply record length except when you write the header. Your
data starts at record 1.
(3) To start a RAF with header, open it as "no
header RAF", write the
header information and
close it. From this point up, the file will
know
how to read itself automatically.
MODES:
o: USE: Opens a file for Read/Write. If
unavailable, will be created.
IN: fls=file name fs=ref name (like
"rf0") ib=true: Open as a no
header
file. rcl=Record length (necessary only when ib=true)
OUT: dnb=true: File
is empty. EOF reached.
r: USE: Reads data for one record.
IN: rci=Record number.
OUT: rcs=record data in a string form.
dnb=true: last data on file
OS[],OD[]=Field data
(for RAF's with headers only)
REMARK: If field no. x is a string, OS[x] contains
the data and OD[x]=0
If field
no. x is numeric, OD[x] contains the data and OS[x]=
contains the same data in a string form formatted according to
field specs.
rh: USE: Read header record.
OUT: rcl=Record Length OS[],OD[]=Field names and types.
w: USE: Write a record.
IN: rci=record number, rcs=record data (for RAF's without headers) or
OS[],OD[]=Field data (for RAF's with headers) See Remark at mode"r"
wh: USE: Write header data. File must be opened
as "no header RAF" to use
this mode.
IN: OS[] containing field names in orde, OD[] containing field type
codes in order.
REMARK: Here is how to find the field type code (od) for a field:
(1) If the field was numeric with (n) decimal digits, od=n/10
So, for an integer od=0 and for a 2 decimal digit number, od=0.2
(2) If the field was a string of (n) characters, od=n
So, for a field which can occupy a max space of 35 bytes, od=35
c: USE: Closes an open file.
_____________________________________________________________________________
gm()
=========
CONTAINING CLASS: pcs and pasp.
USE: Graphics
COMMON OUTPUT: (i,j,k) based GUV's, o, of, od, ob, ad are reset.
REMARKS: (1) At startup, all graphics are rendered to (bio), "the default
graphical device" which is a transparent bitmap object, equal to
the form in size. (bio) is automatically drawn to the form
whenever it receives new graphics unless you turn the
auto-display mode off. It is also drawn to the form automatically
when the form is minimized then restored.
(2) At any point of
your program, you can create a bitmap object and
set it to be your "graphical output device", replacing the
"default graphical output device".
From this point
up, any drawing you do will be done on the new
bitmap surface until you change setup back to the default.
(3) You may use either
cartisian or polar coordinates for defining
all
locations. All measurments are relative to Form,s center.
X values go up as objects move to the right. Y values go up as
objects move up. Angles are positive when rotations are in the
anti-clockwise direction.
Cartisian: (jf,kf) =
x,y values of object's center relative to
Form's center.
Polar: jf = radius kf = angle
between radius and the x-axis in
degrees (0:360)
kb = coordinate flag. kb=true means "polar".
(4) Shape objects are
actually a "GraphicsPath" object to which the
shape has been added. (gpp) is always a reference to the present
shape object.
MODES:
GENERAL:
d: USE: Display whatever is on the default
bitmap. You don't need to use
this mode unless
you have turned auto-display feature off
(see
next)
dn: USE: Turn on / Turn off auto-display (Toggles)
When auto-display is
turned off, you can display
whenever you want with gm("d") Also
you can turn
auto display back on by calling gm("dn") for the
second time. The reason you may need to turn auto-display off
is speeding up the execution of your program and prevention of
flickering during the formation of the drawing.
O: USE: Get references to all related
objects (See Pc# Reference)
e: USE: Erase Present Graphical Output
Device keeping it transparent.
ec: USE: Erase Present Graphical Output Device and paint it with
a single
color.
IN : cls=single color code.
GRAPHICAL SETUPS:
sps: USE: Create solid paint pen and brush objects.
IN : cls=Single color code. i=Pen/Brush width in pixels, default=1
OUT: Solid Pen and Brush created, refrenced to by spp & sbp
spl: USE: Create Linear Gradient paint brush object.
IN : cls=two color's code.
gpp=GraphicsPath object
containing the shape to be painted
ad=Angle in
degrees at which gradient runs accross shape
OUT: Linear Gradient Brush created,
refrenced to by lgp
spr: USE: Create Radial Gradient paint brush object.
IN : cls=two color's code.
gpp=GraphicsPath object
containing the shape to be painted
OUT: Radial Gradient Brush created, refrenced
to by rgp
spt: USE: Create Texture paint brush object.
IN : bip=Present Bitmap Image object.
OUT: Texture Brush created, refrenced
to by tbp
sdd: USE: Set the default display bitmap (bio) to
be the Graphical output
device.
sdb: USE: Set the present bitmap object (bip) to be
the Graphical output
device.
ss: USE: Set the Stroke. Defines how lines terminate,
how line joints
look like and the type of lines.
IN: string (sts) containing 3 char's as follows (default: sts="rrs"):
First char is the "End Cap Style Code" which can be:
b=butt s=square r=round
Second char is the "Join Style Code" which can be:
b=bevel m=miter r=round
Third char is the "Line Type Code" which can be:
s=solid d=dashed t=dotted b=both, dashed & dotted
sq: USE: Set graphics Quality. Defines how to
perform each of the
following 4 operations:
t=text rendering s=smoothing c=composting i=interpolation
Each operation can be done as:"Default", "low quality-high speed"
or "high quality-low speed".
IN: js (0:4 chars long)=Concatenation of
char's which represent the
operations
to be performed at low quality-high speed.
ks
(0:4 chars long)=Concatenation of char's which represent the
operations to be performed at high quality-low speed.
Operations which are not listed in either js or ks will be
performed at default quality.
EXAMPLE: js="c";ks="ti";gm("sq"); will cause "Compositing"
to be done
at low quality,
"Text rendering" & "Interpolation" to be done
at high quality and "Smoothing" to be done at default quality.
REMARK: All options
are automatically selected to be done at
high quality-low speed. So, you need to access this mode only
if you like to lower the quality of performing some operations.
stu: USE: Set unit's Affine Transform.
IN : jf,kf=Original location of object to be transformed
lf,of=New location relative to original location (not relative to center)
jd,kd=Horizontal, vertical scale factors
id,od=Horizontal, vertical shear factors
ad=Rotation angle in degrees. Rotation is around object's center.
ib,ob:If you want created Transform to concatenate with original (utp),
set either (ib=true) causing new transform to be applied first
or (ob=true) causing original transform to be applied first.
ib=ob=false cause new transform to replace original one.
OPERATING ON THE PRESENT GRAPHICS PATH OBJECT (gpp):
Creating new Shape (GraphicsPath) objects:
General parameters for creating all objects (unless specified):
IN: (jf,kf) = Center location relative to form's center.
(lf,of) = Object's width and height.
(id,od) = Shear factors (if desired)
ad =
Rotation angle (if desired)
REMARK: Adding 'd' to the end of the mode string means "draw object".
Addind 'f', means "draw and fill object".
OUT: gpp = Present
Graphics Path object reference.
ca: USE: Create new Arc object.
IN: jf,kf,lf,ofas expected and (jd,kd) = (Start angle, Arch angle)
cl: USE: Create new Line object.
IN: (jf,kf)=start point coordinates (lf,of)=end point coordinates
cr: USE: Create new Rectangle object.
IN: jf,kf,lf,of.
ce: USE: Create new Ellipse object.
IN: jf,kf,lf,of.
ct: USE: Create new Text object.
IN: (jf,kf) , fns = Font.
cp: USE: Create new Graphics Path object.
IN: JF[], KF[]=X,Y coordinates for all points relative to Path's center
j,k=Coordinates of Path's center relative to form's center
OF[] = Curvature of the connection between each 2 points. Zero
indicates a line. smaller value means more flat curve.
c=: USE: Create Equal sided object.
IN: (jf,kf) = Coordinates of containing circle's center
of = Containing circle's diameter.
lf = Number
of sides.
ci: USE: Get Image from file and draw it.
IN: fls=Image file name.
Transforming and rendering (gpp):
COMMON INPUT / OUTPUT: gpp: Present GraphicsPath object.
grd USE: Render-draw (gpp) as is to present graphical
output device.
grf USE: Render-fill (gpp) as is to present graphical output device.
gt
USE: Transform (gpp) applying present Unit Affine Transform (utp) and
make (gpp) the reference of the resulting object.
IN: utp: Present "Unit's Affine
Transform" object.
gtd USE: Do the same as in mode "gt" then draw the resulting (gpp)
IN: utp: Present "Unit's Affine Transform" object.
gtf USE: Do the same as in mode "gt" then draw-fill
the resulting (gpp)
IN: utp: Present "Unit's Affine Transform" object.
grs
USE: Render-fill (gpp) using 3D Special effects
IN: ks=Special Effect type.
ks="r": Reflection ks="d": Depth.
For (Reflection) only: cls=Single Color code.
of=Brightness factor (1:5) default:2.5
For (Depth) only:
cls="Brightest-Darkest" double color code
id=Depth in Pixels, ad=Shear angle.
Obtaining measurments for (gpp):
COMMON INPUT: gpp: Present GraphicsPath object.
COMMON OUTPUT:
os: The type "float" value returned. Note that we could not
use (of) instead since method gm() uses (of) for input.
gw USE: Return the width of the containing rectangle
of (gpp) in (os)
gh USE: Return the height of the containing rectangle of (gpp) in (os)
gx
USE: Return the x-value of the top left corner of the containing
rectangle of (gpp) relative to the output device's center.
gy USE: Return the y-value of the top
left corner of the containing
rectangle of (gpp) relative
to the output device's center.
Using (gpp) as Form's Clip Area:
gc Make the (gpp) Form's clip
area.
OPERATING ON THE PRESENT BITMAP OBJECT (bip):
Creating new (bip):
bn USE: Create a new Bitmap object and assign
its reference to (bip)
IN : lf,of=Width, Height
blf USE: Load
Image file and create (bip) from the resulting image object.
IN: fls: Image
file name
lf,of=Wanted size. lf=of=0 means full scale
Modifying (bip):
bb USE: Blur (bip) This operation is slow. Use
blur factors in the
range 1:5 only.
IN: k=Blur factor
Transforming and rendering (bip):
COMMON IN: bip: Present Bitmap object.
jf,kf: Desired (bip)'s center location relative to form's center.
br USE: Render (bip) to the graphical output
device as is.
brt USE: Render (bip) to the graphical output device while applying the
current Unit's AffineTransform (utp) to the object.
IN: utp: Present "Unit's
Affine Transform" object.
Saving (bip) into file:
COMMON IN: fls=File name.
bsb USE: Save (bip) into "bmp" file.
bse
USE: Save (bip) into "emf" file.
bsx USE: Save (bip) into "exif" file.
bsg USE: Save (bip) into
"gif" file.
bsi USE: Save (bip) into "icon" file.
bsj USE: Save (bip) into "jpeg" file.
bsm
USE: Save (bip) into "MemoryBmp" file.
bsp USE: Save (bip) into "png" file.
bst USE: Save (bip)
into "tiff" file.
bsw USE: Save (bip) into "wmf" file.
PRINTING:
pn USE: Initialize for a new document to be printed.
Obtaining Page measurments:
All measurments are in (1/100)th of an inch.
pgx USE: Get Left margin, assign it to (os)
OUT:os
pgy USE: Get Top margin, assign it to (os)
OUT:os
pgw USE: Get Margin Bounds' Width, assign it to (os)
OUT:os
pgh USE: Get Margin Bounds' Height, assign it to (os)
OUT:os
pgt USE: Get Total Line/Page, assign it to (os) IN:fns=Font Code OUT:os
Printer Setup:
psc USE: Set "Color"-"B/W" setup.
IN:ib=flag, ib=true means "in color"
psl USE: Set "Landscape" flag
IN:ib=true means "use Landscape"
psf USE: Set "Print to File" option. IN:ib=true means "Print to
file"
psn USE: Set Number of Copies. IN:o=number of copies
wanted.
pst USE: Set Collate option. IN:ib=true
means "Collate output"
psr USE: Set Page range.
IN:(j,k)=(From,To) page numbers
psp USE: Set Printer Name.
IN:os=Printer Name
psd USE: Set Document Name.
IN:os=Document Name
psm USE: Set Margins (in inches) IN:j,k,i,o=left, right,
top, bottom
psg USE: Use Show Page Setup dialog to allow user selection.
psi USE: Use Show Print
Information dialog to allow user selection.
Print:
prb USE: Print the present Bitmap object (bip)
IN : jf,kf=Location of (bip)'s center relative to paper's center
lf,of(optional)=size to scale to. Default:full size.
REMARK: jf,kf,lf,of are in (1/100)th
of an inch units.
prt USE: Print contents of Text Array OS[]
IN:OS[]=Text Array, oi=Number of text rows, fns=Font code
prf USE: Print a Text File.
IN: fls=Text File Name fns=font code
____________________________________________________________________________
n()
=========
CONTAINING CLASS: pcs and pasp.
USE: Networking
COMMON OUTPUT: (i,j,k) based GUV's reset.
MODES:
HTTP Protocol:
hg: USE: Sends query / receives data using HTTP
protocol, method "GET".
REMARK: (1) You may add a query string to (urs). To
do so, add "?" at
its end followed with "var1=data1&var2=data2&..."
(2) jb,kb are used to allow/disallow the option of eliminating
html and other tags around data in order to make data more
visible.
IN: urs=URL including query if necessary.
ib = Expected data type indicator. ib=false: text ib=true: binary
jb = true: Replace each pair of brackets (< >) & all enclosed
char's with one '|'
kb = true: Replace each pair of
braces ({ }) & all enclosed
char's with one '|'
OUT: os (if text), OY[] (if binary)
FTP Protocol:
COMMON INPUT: urs: FTP address which starts with "ftp://" and ends with
the
file or
directory which you like to operate on.
Example: urs="ftp://ftp.microsoft.com/developr/Readme.txt"
ids: Your User ID.
pss: Your Password.
fls: Name of the source local file in case you are uploading or
name of the destination local file in case you are
downloading.
COMMON OUTPUT: os: FTP status which shows operation success or failure.
fmd: USE: Makes (Creates) a new directory at a remote
FTP server.
fdd: USE: Deletes (Removes) a directory at a remote FTP server.
fdf:
USE: Deletes (Removes) a file at a remote FTP server.
fgf: USE: Gets (Downloads) a file from remote FTP
server.
fpf: USE: Puts (Uploads) a file to a remote FTP server.
E-Mailing:
ms: USE: Send an e-mail message.
IN : uhs=SMTP (Outgoing) Mail Server address
ids,pss=User
ID and password. If server does not authenticate
outgoing mail, make ids=pss="".
js=Sender e-mail
address ks=Recipient e-mail address
os=Message Subject OS[]=Message Body
ib=Attachment flag. ib=true means attach file (in fls)
fls=Name of attachment file (only if ib=true)
mc: USE: Check for new messages.
IN : uhs=POP,ids,pss = (Incoming) Mail Server,User ID and password.
OUT: os=List
of new messages.
mr: USE: Retrieve one e-mail message.
IN : uhs=POP,ids,pss = (Incoming) Mail Server,User ID and password.
i=Number of the message to be retrieved (Starts with 1)
OUT: os=The wanted message.
md: USE: Delete one e-mail message.
IN : uhs=POP,ids,pss = (Incoming) Mail Server,User ID and password.
i=Number of the message to be deleted.
Low Levet TCPIP Communication:
to: USE: Open a new connection with server.
IN : uhs=Host name upi=Port number
tr: USE: Read server's response.
OUT: os=Received data o=Number of bytes received.
tw: USE: Write (send) a message to server.
IN : os=Message to be sent.
tc: USE: Close Connection with server.
O: USE: Get references to all related
objects (See Pc# Reference)
_____________________________________________________________________________
om()
=========
CONTAINING CLASS: pcs and pasp.
USE: Operations done on (os)
COMMON INPUT: ls = mode
COMMON
OUTPUT:
MODES:
Converting the string in (os) to other types:
ti: USE: Convert Integer number in (os) to int.
IN: os
OUT: o
tf: USE: Convert number in (os) to float.
IN: os
OUT: of
td: USE: Convert number in (os) to double.
IN: os
OUT: od
tb: USE: Convert boolean value in (os) to boolean.
IN: os
OUT: ob
tr: USE: Convert number in (os) to short.
IN: os
OUT: or
tl: USE: Convert number in (os) to long.
IN: os
OUT: ol
to: USE: Convert number in (os) to object.
IN: os
OUT: oo
ty: USE: Convert number in (os) to byte.
IN: os
OUT: oy
ta: USE: Convert concatenated txt lines + \n's
in (os) to array.
IN: os
OUT: OS[]=Text Lines, oi=number of lines
Converting from other types to (os):
fi: USE: Make int number in (os) from int (o)
(Converts (o) to (os)).
IN: o
OUT: os
ff: USE: Make number in (os) from float (of)
IN: of
OUT: os
fd: USE: Make number in (os) from double (od).
It allows you to choose
the number of decimal
digits which the resulting string contains.
IN: od = number to be converted
kd: format code = (desired number of decimal digits)/10
OUT: os
fb: USE: Make value in (os) from boolean value
(ob)
IN: ob
OUT: os
fr: USE: Make number in (os) from short (or)
IN: or
OUT: os
fl: USE: Make number in (os) from long (ol)
IN: ol
OUT: os
fo: USE: Make string in (os) from object (oo)
IN: oo
OUT: os
fy: USE: Make number in (os) from byte (oy)
IN: oy
OUT: os
fa: USE: Make composite string in (os) from
string array OS[]
IN: OS[]
OUT: os
Other operations performed on (os) or OS[]:
c: USE: Cleans (os) It removes all
special characters then trims (os) at
both
sides. You may use (jb) and/or (kb) to eleminate part(s) of
this operation as described below.
IN: os, jb="keep leading spaces" flag. If
(true) will keep leading
spaces if (false) will trim
(os) on both sides.
kb="keep special characters" flag.
If (true) will trim (os) only
without removing special
characters.
OUT: os , i,j,k based GUV's cleared.
m: USE: Inserts string (js) into (os)
at character number (j)
IN: os, js, j
OUT: os
r: USE: Replaces sub-string (js) of (os) with string (ks)
IN: os, js, ks
OUT: os
s: USE: Puts each of the sub-strings of
(os) which are seperated with a
special
character (oc) into a seperate row of array OS[].
Sub-strings are cleaned and trimmed unless you specify (kb=true).
IN: os=Composite string, oc=seperation character
kb=sub-string
cleanup flag. If (true) substrings will be kept as is
without removing non-text characters or (leading & trailing) spaces.
OUT:
OS[]=sub-strings, each in seperate row, oi=number of sub-strings
u: USE: Convert characters of (os) to
upper-case IN/OUT: os
l: USE: Convert characters of (os) to
lower-case IN/OUT: os
hta: USE: Convert Hashtable's key's & values to
arrays
IN: HTC=Current Hashtable object
OUT: KS[]=Keys OS[]=values
hfa: USE: Make Hashtable from key's & value arrays
IN: KS[]=Keys OS[]=values OUT:
HTC=Current Hashtable object
_____________________________________________________________________________
sm()
=========
CONTAINING CLASS: pcs and pasp.
USE: System handling
COMMON INPUT: ls = mode
COMMON OUTPUT: (i,j,k)
based GUV's reset.
MODES:
ge: USE: Get the value of an environment variable.
IN:js=var name OUT:os
gE: USE: Get all environment names(keys) & values.OUT:KS[]=Keys
OS[]=val's
gp: USE: Get PC# Version.
OUT:os
gv: USE: Get C# Version.
OUT:os
go: USE: Get Operating System Version.
OUT:os
gd: USE: Get Usr Domain Name.
OUT:os
gc: USE: Get Computer Name.
OUT:os
gu: USE: Get Usr Name.
OUT:os
gs: USE: Get Stack Trace.
OUT:os
gl: USE: Get Logical Drives.
OUT:OS[]
Date & Time:
REMARK: All the data you are getting can be for current date and time
or
for any date and time you choose.
If you want them for current date and time, supply os="".
If you want them for
a specific date, supply os="mm/dd/yyyy".
If you want them for a specific date
and time supply
js="hh:mm:ss" in addition to (os)
dd: USE: Get date as mm/dd/yyyy
IN:os (See Remark) OUT:os
dt: USE: Get time as hh:mm AM/PM
IN:os (See Remark) OUT:os
dw: USE: Get Weekday as Monday
IN:os (See Remark) OUT:os
dm: USE: Get Month name as January
IN:os (See Remark) OUT:os
dl: USE: Get long format of date
IN:os (See Remark) OUT:os
Long format as: Monday, January 02, 2006
e: USE: Exit to Command mode.
IN: i=Optional exit code number
_____________________________________________________________________________
tm()
=========
CONTAINING CLASS: pcs (all modes) and pasp (modes "d,dl,s" only)
USE: Text handling
COMMON INPUT: ls = mode
COMMON OUTPUT:
REMARKS: (1) This method sends its output to the default text output
device (toa) Also, at mode "i" it receives its input from the
default text input device (tia). Device assignments of (tia & toa)
can be set or changed using method dm() at modes "to" and "ti"
respectvely.
(2) The default mode
for this method is "dl". So tm(); is the same
as tm("dl");
MODES:
i: If (tia="t") or (tia="f"):
USE: Display the value contained into (os) to user, then get the line
of text he/she enters into (os) also and jump to the block number
requested in (bli). See remarks
IN: os = String to display to user.
bli = block number to jump to.
OUT: os = Line of text entered by user.
REMARKS: Always follow tm("i") with (return;)
If (tia="s"): Everything
is done in same manner except that there will
be no jump to a new block and
you need not to follow tm("i") with a
(return;)
d: USE: Display the value contained into
(os) and keep cursor on same line
IN: os = String to display. See remarks.
dl: USE: Display the value contained into (os)
then move cursor to nxt line
IN: os = Line of text to display. See remark
(2).
c: USE: Clear screen (Applies to both
text screen and Console)
g: USE: Get text (Applies to text screen
only)
OUT: OS[]=Text lines oi=Number of lines
flt: USE: Load plain text file into text screen
IN:fls=File name
flu: USE: Load unicode plain text file into text screen IN:fls=File name
flr:
USE: Load rich text file into text screen IN:fls=File name
fst:
USE: Save text screen to a plain text file IN:fls=File name
fsu:
USE: Save text screen to a unicode plain text file IN:fls=File name
fsr: USE: Save text screen to a Rich
Text File (RTF) IN:fls=File name
p: USE: Print text screen contents using
(fns) IN:fns=Font code
vg: USE: Hide "text screen" to give visibility
to graphics.
vt: USE: Return visibility to "text screen".
O: USE: Get text screen objects.
OUT: rta,tfa,mma,lba,pna = References to text screen control objects
b:
USE: Cause the speaker to beep in order to draw attention.
s: USE: Access string (txs) search &
browsing
IN: txs=String to
be searched
js=String to skip ks=String
to stop reading immediately before
j=Number of (js)'s
to skip. If (js="" & ks="") it means number of
char's
to skip.
OUT: os=String starting after last (js) and ending before start of
(ks)
REMARKS: (1) If ks="": os="" and only (txs) part following last (js)'s
end will be kept.
(2)
If js="", os=String starting at char zero and ending
before start of (ks)
(3)
If (js="" & ks=""), os="". The first (j) chars of (txs)
will be eliminated only.
_____________________________________________________________________________
um()
=========
CONTAINING CLASS: pcs and pasp.
USE: Utilities
COMMON INPUT: ls = mode
COMMON
OUTPUT:
MODES:
b: USE: Jump to a new block.
IN: bli = requested block number.
REMARK: Always follow um("b") with (return;)
c : USE: Clear i, j and k based GUV's.
co: USE: Clear contents of all (o) based variable.
C : USE: Clear i, j and k based GU Arrays.
CO: USE: Clear contents of all (o) based Arrays.
s: USE: Sleep.
IN: i = time in melliseconds.
t: USE: Timer. Measures time in seconds
which has passed since last call.
OUT: o (Seconds)
g: USE: Force garbage collection.
O:
USE: Check to see if an object is null.
IN : ks=Name of any public object (see
PC# Reference)
OUt: ob=null state flag. ob=true means object is null.
Mathematical
operations:
ma: USE: Mathematically calculate abs(number)
IN: od
OUT: od
mc: USE: Mathematically calculate ceil(number)
IN: od
OUT: od
mf: USE: Mathematically calculate floor(number)
IN: od
OUT: od
ml: USE: Mathematically calculate log(number)
IN: od
OUT: od
mn: USE: Mathematically calculate the minimum of 2 numbers.
IN: od , jd
OUT: od
mp: USE: Mathematically calculate (od) to the power (jd)
IN: od , jd
OUT: od
mr: USE: Mathematically generate a random number in the range (0 : i)
IN: i=max value
OUT: o
ms: USE: Mathematically calculate Square Root(number)
IN: od
OUT: od
mt: USE: Mathematically calculate Trigonometric functions.
IN: od, js = function or constant name, could be:
"sin", "cos", "tan", "asin", "acos", "atan" or "pi"
OUT: od
mx: USE: Mathematically calculate the maximum
of 2 numbers.
IN: od , jd
OUT: od
_____________________________________________________________________________
wm()
======
CONTAINING CLASS: pasp only.
USE: Web handling
COMMON INPUT: ls = mode
COMMON
OUTPUT: (i,j,k) based GUV's cleared
MODES:
h: USE: Opens HTML page. It generates
necessary HTML tags upto <body>
and sets
page title and colors. It also opens the html file
and write all generated tags into it.
IN : fls = Output html file
name
os = Page's title.
cls = Page foreground / background combined color code.
ks = HyperLink unvisited / visited combined color code
ims = If you like to display an image as a background for the
page assign its URL to (ims)
o: USE: Opens Literal control HTML loading operation. It does
a cleanup
job which is necessary to do before
starting to load HTML into
(cis) for a Literal
control or label of another control.
Displaying Text:
COMMON USE: Displays the text string assigned to (os) You can either
supply the
color, font, alignment and indention sperately
or supply a text
style code in (cs) which sets them
all at once.
COMMON IN : os = Text to be displayed.
cs = Text style code, defined into method setup() which spcifies
the color, font alignment and indention.
cls = Foreground
color (2-char color code)
fns = Font code.
ds = Alignment used to display text (direction). could be :
e = east w = west or c = center.
REMARK: (ds="e"), (ds="w") are effective only at mode "dp".
j = Indention in number of characters.
d or dw:USE: Displays the text string (word) supplied into (os) and
keeps
cursor on same line at the end of displayed
text.
IN : os,cs,cls,fns,ds,j (See above)
dl: USE: Displays the text string supplied into
(os) then moves cursor to
next line.
IN : os,cs,cls,fns,ds,j (See above)
dp: USE: Starts a new paragraph, displays the
text string supplied into
(os) then keeps cursor
at the end of displayed text.
IN : os,cs,cls,fns,ds,j (See above)
l: USE: Start "Leave text as is"
mode. Allows displaying text as is until
the mode is closed by hm(lc) In this mode leading and trailing
spaces and also line feeds are left unchanged. However you may
still specify text color, font and direction in this mode.
lc: USE: Closes "Leave text as
is" mode.
Creating Hypertext:
a: USE: Generates the "anchor" tag which
allows user to link to a
different page file at
a different (URL) by clicking on a phrase
within
the HTML document.
IN : urs = URL address of destination file or an e-mail
address to send
message to. os = Phrase to click on
Creating Tables:
to: USE: Opens a table. It generates the opening
tag and specifies options
IN : i = Number in pixels which specifies both the
border width and
cell
padding. (i=0) means table with no borders.
o
= The percentage amount of table's width relative to page width
cls: Default color code for the table.
fns: Default
font code for the table.
th: USE: Generates one table header row.
IN : OS[] = Header. Titles of all columns in sequence.
I[], O[] = Column and row span. Number of columns and rows which
each column data occupies. Default is (1).
LS[] = Direction. How each column text is aligned inside its
containing cell.
JS[] = Font used for displaying
each column text.
KS[] = Foreground color code
(2-char code) for each column
td: USE: Generates one table data row.
IN : OS[] = Data. The text content of all columns in one row.
I[], O[], LS[], JS[], KS[] = Same as in mode "th".
tc: USE: Generates closing table tag.
Installing Controls:
i: USE: Install one control. Called from
method setup() to install control
into PC# arcives.
IN : cs=Control's keyname cis: Control's label
cns=Control's table container.
CIS[]=Item names
for multi-item controls like "Choices".
cus=Default
return value.
j,k=Coordinates of control's starting
grid
i,o=Column span (horizontally and vertically)
Which means the
number
of grids a control covers in both directions. Default:1
jf,kf=Length in (chars,lines) for tf's and ta's.
lf,of=(Width,Height) in pixels for a Control.
od=Maximum Length in (chars) for tf's and ta's only.
jd=Border width for Tables and Calendar.
kd=CellSpacing
for Tables, GridView and Calendar.
ds=Direction
or alignment code. Can be (n,s,e,w,c.ne,nw,se,sw)
Meaning (North,South,East,West,Center,Northeast,Northwest,
Southeast,Southwest) It shows where a control and its label
should be placed inside their containing grids.
cls=Foreground-Background combined color code.
fns=Font Code
cts=tooltip text (appears when placing
mouse curser at control)
vlb=Validation bool (vlb=true
means do field required validation)
vls=Validation
string for Range and Compare validation.
vlc=Validation
char. Indicates the type to base validation on.
Can be (i,d,s,D,C) meaning (int,double,string,Date,Currency)
ims=bckground Image url. For Images, Hyper links.
urs=URL for Hyper Links. Can also be an e-mail address.
ib=Boolean value. Have different meanings for different controls.
For Text Fields:(ib=true) means password text field.
For Submit and Reset buttons: (ib=true) indicates that you are
replacing the button with a clickable image.
For Radio Buttons: (ib=true) causes the button to be selected.
ob=editability. For tf,ta: ob=true:Read only.
os="Label positioning indicator". Can be (n,s,e,w) meaning set label
(above, below, right of, left of) its control.
kb=AutoPostBack flag. (kb=true) means turn the feature on.
id=Tab index (control scan order when pushing TAB's
starting by 0)
js(for gv only): Contains any
number of these chars concatenated:
s/S=Insert/Remove Select bttn d/D=Insert/Remove Delete bttn
e/E=Insert/Remove Edit button
r/R=Allow/Disallow Sorting p/P=Allow/Disallow Paging
h/H=Show/Hide Header f/F=Show/Hide Footer
g/G=Show/Hide Grid seperation lines
COMMANDS[](for
gv only): contains any number of SQL commands to
execute and display the resulting data on the GridView.
Additionally you may include (cus), (cui) and/or CUS[] to set
default return values.
Controls' setup:
REMARK: See "Common Output" for var's which are reset befor return.
sC: USE: Set color IN:cls=Background-Foreground
compound code
sF: USE: Set font IN:fns=Font code
sB: USE:
Set Bounds IN:(lf,of)=(Width,Height),jd=Border width. All in Pixls
ss: USE: Set Size (for tf,ta)
IN :(jf,kf)=Number of Visible(chars,lines),
od=Max no. of chars (visible & invisible)
For (tb,ca,gv): kd=Cell Spacing in Pixels
sg: USE: Set background image IN: ims=Image file name
or ims="b":use (bip)
st: USE: Set tool tip
IN: cts=tooltip text.
sn: USE: Set TAB order IN: id=TAB order
for the comp. id=-1: Skip it
sl: USE: Set control's label(For lb,bt,cb,rb,hl) IN: cis=Label text.
sL: USE: Set Add to list for multi-item controls IN:CIS[]=Items to be added
su:
USE: Set update value. For tf, ta,
IN : For (tf,ta) cus=String to use as initial
value. For (bt,cb,rb)
supply cus="0" or cus="1"
to set state to Off or on.
For (ch,Single item
ls) supply (cui=index of item to be selected)
For (Multiple item ls) supply CUS[] containing "1" or "0" in its
rows to set the state of the list item each row represents.
For Hyper links(hl) supply (urs=URL to navigate to)
sb: USE: Set bool value IN: ib=value
Meaning depends on control type.
for tf's ib=true:
means pswrd tf. (char's replaced with "*"'s)
for ls's ib=true: means Multi-selection ListBox.
for gv's ib is not used. js contains all setup values (see mode i)
se: USE: Set editability IN:
ob=value. For tf',ta ob=true: Rd only txt
sE: USE: Enable/Disable a control IN: jb=true:
means Enable control.
sx: USE: Set focus.
sp: USE: Set Page Size (for
gv only) IN: o=Number of lines per page.
sc: USE: Set Column data (for gv only)
REMARK: You call this mode once for each column
to be displayed.
If You like to display all columns
as they are, don't call this
mode. If you call
it once, all original columns will be eliminated
unless you call back to set each of them.
IN : js=Original column name
ks=Desired col name, ks="" means use (js)
oc=Formatting
char for numeric fields. Can be:
C=Currancy F=Fixed [Assign wanted dec digits number to (j)]
ims=URL of Background Image to replace column name with.
cls=Combined Foreground-Background Color code.
Performing Bitmap operations:
bo: USE: Open a new bitmap operation for dynamic
graphics generation. It
creates the bitmap (bio),
sets it as the "Graphical output device"
then
Sets the content type to "Image/jpeg" and prepares the
Response object and buffering for image delivery.
IN : (lf,of)=(Width,Height)
of desired bitmap object
bc: USE: Close current bitmap operation. It sends object to client's
browser then disposes all generated objects.
Operations done on the Request and Response Objects:
rq USE: Read URL's Query string and retrieve
all values for one key.
IN : ks=Key (or parameter) Name.
OUT: OS[]=All values
rw USE: Write a string to the page. String may contain HTML tags.
IN : os=String to write.
rr USE: Redirect to another web page.
IN : urs=URL for the destination page.
Page, Session and Application Variables:
vs USE: Set (or store) an application,
session or page string variable.
IN : ks=Variable name os=Variable
value
ks must end with "_a", "_s" or "_p" to indicate
that the variable
type is "application", "session"
or "page" respectively.
vg USE: Get (or retrieve) an application, session or page string
variable.
IN : ks=Variable name OUT: os=Variable value
ks must end with "_a", "_s" or "_p" to indicate that the variable
type is "application", "session" or "page" respectively.
c: USE: Close HTML page. It generates
closing tags for all open tags.
_____________________________________________________________________________
xm()
=========
USE: Accessing External Objects.
COMMON INPUT: ls = mode
COMMON OUTPUT: (i,j,k)
based GUV's reset.
REMARKS: (1) Any program which contains calls to method x() for the
purpose
of accessing external programs must be
executed with the "xrun"
tool. To execute a file
named "FileName.exe" with the "xrun"
tool, from
command mode type: xrun FileName [Enter]
(2) The file x.txt is used
internally by this method.
MODES:
Operations done on threads:
tc: USE: Create one thread.
IN : o=Thread number, os=Thread private objects, bli=block to start at.
t#: USE: Get Current thread
number. OUT:o=Thread number
tms:
USE: Send message to another thread. If mail box of recipient thread
was not empty, message will not be sent and (dnb=false) will be
returned.
IN : o=Recipient thread number, os=Message OUT:dnb, true means
done
tmr: USE: Receive incoming message. If no message is found (dnb=false) will
be returned.
OUT: o=Sender thread number, os=Message, dnb, true means done
tp:
USE: Set priority for one thread.
IN : o=Thread number, i= Priority (0:4), 4
means heighst priority.
tw: USE: Wait for a specific amount of milliseconds or until waked up by
another thread (using mode "tu", "tua" or "ti")
IN : i=Time to wait in milliseconds.
(i=0) means wait until waked up.
tu: USE: Pulse the thread which has been waiting the longest in
a
synchronized block.
tua:
USE: Pulse all waiting threads.
ti: USE: Interrupt a waiting or sleeping thread. IN:o=Thread
number.
ta: USE: Thread abort.
IN:o=Thread number.
ts: USE: Get Thread State.
IN:o=Thread number.
OUT: os=Thread State can be="u/r/w/s/a" Where: u=Unstarted
r=Running
w=Waiting or sleeping
s=Stopped (finished running) a=Aborted
Running external programs:
r: USE: Run an extrnal program.
IN : os=external program name followed with all parameters exactly
as done from command mode.
bli=Block number to
go to after external program has been executed.
OUT: os=Text output of the external
program.
_____________________________________________________________________________