waldbauer.com

waldbauer.com (http://www.waldbauer.com/vb/index.php)
-   SPI OA4 Open Access II/III/IV (2,3,4) Anwender Forum (http://www.waldbauer.com/vb/forumdisplay.php?f=57)
-   -   Nützliche Tips (Ergänzungen zum Handbuch von Heinz Richartz) (http://www.waldbauer.com/vb/showthread.php?t=1919)

Nützliche Tips (Ergänzungen zum Handbuch von Heinz Richartz)
 
Liste der Anhänge anzeigen (Anzahl: 2)
Hier mal eine übersichtliche Liste über alle OAC Module und Funktionen, damit findet man hoffentlich leichter, was man sucht. Wird ggf. weiter ergänzt, wenn neue Funktionsnamen bekannt werden.
Die Module, die Sourcecode dabei haben (gekennzeichnet durch den [src] Link), haben in dem .ZIP Paket meistens auch ein sample dabei.

ACFG.OAC
ALOADCFG

ALIAS.OAC
Shows the Alias-Table and returns the alias the user selected.

GETAL3 - For OA3
GETAL4 - For OA4
GETALIAS - For OA3

ASC.OAC [src]
This application will return (as an integer) the ASCII number
equivalent of a character (it is the opposite to the CHR function).
It is designed to be used within Programmer/Compiler but could be 'built'
to be used from other facilities.
ASC

AUTOVAL.OAC
AUTOVAL - Automatic counter

CAP.OAC
CAP (-> same function as INITCAPS in CAPS.OAC)

CAPS.OAC [src]
This language call contains 3 string functions which can be used
within Database, Spreadsheet, or OAIII Programmer/Compiler.
These functions can be used to change the format of a text string.
Maximum characters that can be input is 128.

Functions included:
INITCAPS - convert the text string to have INITIAL CAPITALS
UPPER - convert the text string to ALL Upper Case
LOWER - convert the text string to ALL Lower Case

CFG.OAC
LOADCFG
SAVECFG

CONCAT.OAC
CONCAT

CONIO.OAC [src]
Various console IO functions

GETCH - Get a character from the console without echo.
GET_KEY - The same function as GETCH, but doesn't wait for a key pressed, if no character is in buffer, instead always returns immediately.
KBHIT - Checks the console for keyboard input.
GETXKEY - Returns the scancode of a character in the console buffer, if available.
ISFKEY

CONVERT.OAC [sample]
CONVERT - Convert a string in a number of set functions
CVTNUM - Converts a number to a formatted string
XLATE - Translate one string to another

COPY.OAC
COPY - The routine copies file src to dst.

CTYPE.OAC [src]
Wraps the C language character classification routines for OpenAccess.

OISALPHA - The routine returns true if c is a particular representation of an alphabetic character.
OISASCII - The routine returns true if c is a particular representation of an ASCII character.
OISALNUM - The routine returns true if c is a particular representation of an alphanumeric character.
OISCNTRL - The routine returns true if c is a particular representation of a control character.
OISDIGIT - The routine returns true if c is a particular representation of a decimal-digit character.
OISGRAPH - The routine returns true if c is a particular representation of a printable character other than a space.
OISLOWER - The routine returns true if c is a particular representation of a lowercase character.
OISPRINT - The routine returns true if c is a particular representation of a printable character.
OISPUNCT - The routine returns true if c is a particular representation of a punctuation character.
OISSPACE - The routine returns true if c is a particular representation of a space character.
OISUPPER - The routine returns true if c is a particular representation of an uppercase letter.
OISXDIG - The routine returns true if c is a particular representation of a hexadecimal digit.

CURSOR.OAC
CURSOR

DATE.OAC [sample]
Does various date conversions

DATCONV1 - Return a month number from a date
DATCONV2 - Convert a date into it's month name
DATCONV3 - Return the year from a date
DATCONV4 - Returns the day of the month from a date
DATCONV5 - Returns a human readable date in the form [day] [month name] [year].
DATCONV6 - Returns the day of week of a given date.
DATCONV7 - Returns the name of a day
DATCONV8 - Returns the week number of a week
DATCONV9 - Returns an integer specifying the day of the year
DATCONVA - Returns an integer in the format [yy][mm]
DATCONVB - Returns the month's first day of the specified date in the format 01.[mm].[yyyy]
DATCONVC - Returns the month's first day of the next month of the specified date in the format 01.[mm].[yyyy]

DATE2STR.OAC
DATE2STR

DATEDIF.OAC
Various date functions.

DATEDIF1 - Calculate the difference in months between two dates
DATEDIF2 - Calculate the difference in years between two dates
DATEDIF3 - Add an exact number of months to a date
DATEDIF4 - Add an exact number of years to a date
QTR1 - Return the previous quarter day for a date
QTR2 - Return the next quarter day for a date
QTR3 - Return the number of days from the previous quarter day
QTR4 - Return the number of days to the next quarter day

DBFUNC.OAC [src]
Various mathematical functions

ABS - Calculate the absolute value of a REAL
EXP - Calculate the exponential of a real
TRUNC - Truncates the decimal part of a real (returns a real)
INTEGER - Truncates the decimal part of a real (returns an integer)
LN - Calculates the natural log of a real
PWR - Calculates X to the power of Y
ROUND - Round a real to a specified precision
SQRT - Calculates the square root of a real

DEL.OAC
DIFFELD
DEL

DESK.OAC
The C Hook DESK.OAC contains a number of useful controls over the desktop
accessories in Open Access.

Designed for use by the users of Programmer, users may be prevented from
accessing parts of the desktop. So, the programmer can prevent the desk
from appearing when the user presses <desk:F8>.

Similarly, <alt F3:print screen>, <alt F8:macro> and <alt F4:ascii table>
can be forced to remain silent when the user requests them.

Alternatively, applications can force parts of the desk to appear is the
programmer wants to.

CALC - Passes a value to the calculator and makes it appear
DESK - Offers a variety of controls over the desktop accessories
DESK_OFF - Disables the desktop
DESK_ON - Allows the desktop to appear
DESK_UP - Makes the desktop pop-up
PRT_OFF - Disables the <print screen:Alt F3>
PRT_ON - Allows <print screen:Alt F3> to occur
PRT_UP - Pops up the <print screen:Alt F3> menu
SHOW_OFF - Disable the display of screens
SHOW_ON - Re-enable the display of screens

DESKDISA.OAC
DESKDISA

DIAL.OAC
DIAL

DISPASS.OAC
DISPASS

DRAWD.OAC
DRAWD - Pfeiltasten bekommen eine Linien-Funktion

DRAWS.OAC
DRAWS - Pfeiltasten bekommen eine Linien-Funktion

ERRORS.OAC
The C Hook ERRORS.OAC contains functions that are designed to help the
developer by allowing access to the Open Access error handling routines.

This allows developers let Open Access worry about screen displays while
the developer handles the programming. It also uses the Open Access
user interface for a consistent interface with the user.

It is possible to force Open Access error messages to appear and to insert
your own text in them. Also, you may make use of the standard Open
Access 'ABANDON' messages.

Finally, you can force the help screens to pop-up if you feel the user
needs that extra help.

ABANDON - Displays the Open Access Abandon message
CLEARERR - Resets the Open Access errornumber
HELPA - Forces the help window for the application to appear.
HELPS - Forces the help window for the system to appear.
SETERR - Displays an Open Access error message

FFILE.OAC
Repairs the given database.

FIXFILE - Shows the Repair dialog.
VERIFY - Verifies the integrity of the selected database.
FIX - Repairs the selected database.
RESIZE - Tries to shrink the selected database.

FILE.OAC
The FILE.OAC C Hook bring many useful functions to the Programmer. These
bring the friendliness of the Database module to the developer seeking
an easy way of working with files and users.

Open Access Programmer has long been missing a function to delete
temporary work databases or text files. The KILL function at last gives
the developer a means to delete files in the searching orders.

Neither has it possible to check that a file is really is present before
you start using it. The EXISTS function now lets you check for the
presence of a database before you start using it.

Many developers would like to give their users the ability to pick the
files they are going to work with. The remaining functions pop-up
the <F4:search> window and pass back the chosen file to the program.

DISP_ALL - Display the F4 search window for Database and other files
DISP_DB - Display the F4 search window for Database files
EXISTS - Checks for the existence of a file
GET_DB - Prompts the user for a database filename.
KILL - Delete any file in the searching orders

FILE0.OAC
Wraps the C-language file IO functions to OpenAccess to allow reading from and writing to files.

C_OPEN - Opens the file specified by filename and returns a file descriptor to it.
C_READ - Reads data from a file previously opened by C_OPEN.
C_WRITE - Writes data to a file previously opened by C_OPEN.
C_CLOSE - Closes a file descriptor you obtained from C_OPEN.

FILE1.OAC
Wraps some file pointer operations, requires FILE0.OAC

C_EOF - Tests for end-of-file.
C_LSEEK - Moves a file pointer to the specified location.
C_TELL - gets the current position in a file.
C_FSIZE - Returns the size of a file previously opened with the C_OPEN function

FILECOMP.OAC (=FILEFUNC.OAC) [src]
This language call contains 6 TEXT file functions which can be used
within OAIII Programmer/Compiler.
These functions can be used to maintain ordinary text files within OAIII
programmer. They can also be used within other modules of OAIII, if this
is necessary. All functions, except one, pass a BOOLEAN back to OAIII.
There is a limit of 98 characters that can be passed as the text line to
the APENDONE function.

Due to the fact that version 3.02 of the OAIII Compiler treats C calls
in a different way to OAIII programmer, an additional C call Application
has been created (FILECOMP.OAC). This C call Application should be used
instead of the FILEFUNC.OAC C call Application. It has the same
functionality as FILEFUNC.OAC; however, two of the inbuilt functions
have been modified (parameter type has been altered).

SHOWFILE - place a file into notepad and display it
SHOWDIR - display the OAIII (search order) directory
FILEXIST - test if a file exits (search ALL paths or current path)
FILEDEL - delete an existing file
APENDALL - append the entire contents of a file to another
APENDONE - append one string of characters to a file
WHEREIS - pass back the search path nickname for a given file
CLRWRITE - clear a text file and write first line

FILENAME.OAC
SEL_FN - The routine shows the file browsing dialog and returns the name of the selected file.
GET_FN - The routine shows the file open dialog and returns the name of the selected file.

FINANCE.OAC [src]
This Language Call application contains six financial routines for
calculating

ANNCOM - Annuity Compound Amount Factor
ANNPRES - Annuity Present Value Factor
CAPREC - Capital Recovery Factor
COMAM - Compound Amount Factor
PREVAL - Present Value Factor
SINKFUND - Sink Fund Factor

GFKEY.OAC
GKEY_LO
GKEY_UC
GKEY_LC
GKEY_UI
GKEY_LI
GKEY_UR
GKEY_LR
GKEY_UG
GKEY_LG
GKEY_UB
GKEY_LB
GKEY_0
GKEY_LZ
GKEY_LV
GKEY_LT

GRFONT.OAC
GRFONT

IOGETSTR.OAC [src]
This application retrieves a string from the serial port and
places it into the typeahead buffer. This can be used
to retrieve any size of string.
IOGETSTR

JAHR.OAC
JAHR (same as DATCONV3)

KEYBOARD.OAC [sample]
The C Hook KEYBOARD.OAC contains functions designed to improve on and add
functionality to Open Access's keyboard handling.

This includes a PASSWORD facility that echoes '*' to the screen instead of
the password.

The developer can check to see if any key has been pressed or can clear
the keyboard buffer before asking important questions. Additionally, the
ability to control the keyboard directly and get each single keypress
is available for the first time.

The C Hook also works the other way around and allows the user to place
keystrokes directly into the keyboard buffer letting programs write their
own macros, on-the-fly !

Finally, the user of these functions has control over the display of the
cursor and can pause Open Access while displaying a copyright message.

CURS_OFF - Turns off the cursor
CURS_ON - Turns on the cursor
FLUSHBUF - Clear the Open Access keyboard buffer
FORCED1 - Places today's date in the keyboard buffer eg. 31/12/1996
FORCED2 - Places today's date in the keyboard buffer eg. 21st April
FORCET1 - Places the time in the keyboard buffer eg. 10:03:54 AM
FORCET2 - Places the time in the keyboard buffer eg. 10:03
GETTAMT - Report how many characters are in the keyboard buffer
GET_CH - Get a single character from the keyboard, without echo
GET_CHE - Get a single character from the keyboard, with echo
ISKEY - Is there a key waiting in the keyboard buffer ?
KEYSTUFF - Put a function key in the keyboard buffer.
PASSWORD - Prompts the user for a string, echoing '*' to the screen
PAUSE - Pause the program
STRSTUFF - Place a character string in the keyboard buffer

KEYBUFF.OAC [sample]
2 functions to read a password or characters from the keyboard.

CHARKEY - Checks for a character in the keyboard buffer and returns it
PASSW - Reads a password at the specified position of the screen.

LISTCALL.OAC
LISTCALL

MAILMERG.OAC
MAILMERG

MODES.OAC [src]
This Language call allows you to configure the screen configurations
found in the CONFIG.SCR file. This works very similiar to configuring
a printer from Utilities Configure Printer Parameters.
MODES

MONEY.OAC [src]
This language call contains 3 numeric functions which can be used
within Database, Spreadsheet, or OAIII Programmer/Compiler.
These functions can be used to round a money amount to the nearest
five cents, or split the money amount into dollars and cents. (This
function will be of use when one and two cent coins are no longer
available in Australia).

RNDMONEY - round to the nearest five cents
DOLLARS - remove the cents
CENTS - remove the dollars

MONTH.OAC
MONTH - Returns the month from a date

MOUSE.OAC [sample]
The C Hook MOUSE.OAC delivers what others only promise. Using the
functions in this C Hook, the developer can control a Microsoft (or
compatible) mouse.

The mouse can be displayed or suppressed. One simple routine tells the
developer where the mouse is and what buttons have been pressed.

MOUSE_PR - Is a mouse present ?
MOUSE_HI - Hide the mouse cursor
MOUSE_SH - Turns on the mouse cursor
MOUSE_ST - Give the mouse status (position, buttons pressed)

MUSIC.OAC [src]
MUSIC - Send tone to speaker based on frequency and duration

PASS.OAC
Reads a password from the user at the current cursor position and returns it.
PASS

PASSWORT.OAC
Displays a dialog that prompts the user for a password and returns it.
PASSWORT

PRGRAPH.OAC
G_PLACE
G_MENU
G_MODE
G_DBRPT
G_GETPCX
G_PUTPCX
G_DITHER
G_OUTREG
G_GETPAR
G_SETPAR

PRTFUNCT.OAC [src]
This language call contains 5 printer functions which can be used
with OAIII Programmer or Compiler to find out printer information.
These functions are real handy for getting paper parameters from
the current printer configuration. The PRINTER IS statement must
have been executed before you can try these functions.

TOTALLN - returns total number of lines per page
LINENO - returns the current line number on the page
LINELEN - returns the characters per line
PRTNAME - returns the printer configuration name
PRTTYPE - returns where the output is going printer, file, or console

PWR.OAC [src]
PWR

SCANJET.OAC
GKEY_LS

SCANT.OAC
SCANT

SCRNCTRL.OAC [src]
This application allows you switch the OA screen OFF or ON. The main
use for this application would be for securing password entry from
within programmer. It can also be used to automatically start a programmer
or Compiled application without displaying the OA main menu or application
menu. This is done by starting OA with the A= and M= parameters. A macro
must be called that either turns the screen on again using an option
on the Applications Menu, or that starts a program that first turns the
screen back on. A sample text file is provided to be used with
the A= parameter (i.e, OA3 A=cstart).

SCRNAOFF - for automatic screen off when entering OA
SCRNOFF - turn screen off from anywhere within OA3 (including programmer)
SCRNON - turn screen on from anywhere within OA3 (including programmer)

SCRNPROG.OAC [src]
This application performs the same task as SCRNCTRL but can only be
used within programmer. The source code written in C is an example
of how to pass an integer to a C program from within OA.

SCRNPROG

SCROFF.OAC
SCROFF

SETUP.OAC
The C Hook SETUP.OAC contains many functions that allow the user to
modify Open Access's internal variables, on-the-fly.

If you want to control the colour schemes Open Access uses from inside
your programs, this is now possible. This allows the developer to create
more pleasing displays, hide on-screen items or alert the user to problems
and then reset the colours back to normal.

Users of Open Access are notorious for changing default filenames, date
formats and searching orders. Now, you have the ability to interrogate
all of these functions and then change them yourself, all from within
Programmer.

Using these functions, it is possible to record the current Open Access
environment, change the colours, searching orders etc. to what you want
for the smooth working of your programs and then reset it all at the end.

GETAPP - Return the default appointments filename
GETBUS - Return the default business cards filename
GETCOL - Get an Open Access colour value
GETDATE - Get the current Open Access date format
GETNICK - Return one of the searching order nicknames
GETNOTE - Return the default notepad filename
GETNUMV - Return the number of searching orders
GETVOL - Return a searching order volume / pathname
REINIT - Reset all of the Open Access variables
SETAPP - Set the default appointments filename
SETBUS - Set the default business cards filename
SETCOL - Set an Open Access colour value
SETDATE - Set the current Open Access date format
SETNICK - Set one of the searching order nicknames
SETNOTE - Set a new default notepad filename
SETVOL - Set a searching order volume / pathname

SKIP.OAC
SKIP

SKIP2.OAC
SKIP2

SORT.OAC
SORTRECS
MEMOCONT

START.OAC
START

STATIONS.OAC
STATIONS - Shows the number of available and installed stations.

STRFUNC.OAC [src]
This language call contains 4 string functions which can be used
within Database, Spreadsheet, or OAIII Programmer/Compiler.
One function can be used to look for a particular occurrence of a
small string within a larger text string. The other three functions
are used to test for what type the string is (i.e., ALPHA, NUMERIC,
ALPHANUMERIC)
Maximum characters that can be input is 128 (256 for Poso function).

POSO - find a particular occurrence of one string within another
ALPHABET - is the string part of the alphabet ?
NUMERIC - is the string numeric ?
ALPHNUM - is the string alphanumeric ?

STRING.OAC [src]
Various string conversion functions.

FORENAME - Returns the first word or forename in a string
INITIALS - Returns the initials in a string
SURNAME - Returns the last word (surname) of a string
LCASE - Converts a string to lowercase letters
UCASE - Converts a string to uppercase letters
LEFT - Returns the left-most n characters of a string
MID - Returns a sub-string of another string
PROPER - Returns a string where letters starting a word have been
converted to uppercase, while the other letters in the word are converted to lowercase.
RIGHT - Returns the right-most n characters of a string
SUBSTR - Returns a substring of another string from a position
TRIM - Remove leading and trailing blanks from a string

STUFF.OAC
STUFF - Stuffs a special function key into the keyboard buffer.

TAG.OAC
TAG (same as DATCONV4!)

TIME.OAC
The C Hook TIME.OAC places the developer in charge of the Open Access
desktop clock.

You can access and alter the time zone information displayed by the
desktop.

The function TIME_ON will place a constantly ticking clock any where you
want on the screen.

TIME_ON - Display a constantly ticking clock on the screen
TIME_OFF - Turn off the on-screen clock
GETTIME - Give the title of one of the time zones
SETTIME - Set the title of one of the time zones
GETZONE - Give the offset of one of the time zones
SETZONE - Set the offset of one of the time zones

TOOLS.OAC [sample]
ABS - Return the absolute value of a number.
ASC - Convert a character to the ASCII number equivalent.
CFWD
CHR - Returns the character for the given ASCII code.
DIVIDE - Divide 1 number (or date) by another without zero divide
LENGTH - Returns the length of a given string.
MAXOF2 - Return the largest of two values passed to it
MINOF2 - Return the smallest of two values passed to it
PERCENT - Find the percentage of one number by another
ROUND - Round a value to a specified precision

TYPAHEAD.OAC [src] [sample]
This application has two function calls : it allows you to place
a character a small string into the keyboard type ahead buffer,
it can also place ONE function key at time into the keyboard buffer.
Using these two functions it is possible place a combination of characters
and function keys into the keyboard buffer (Maximum of 64 Characters).
This function can only be called from Programmer/Compiler. It could be
modified to be used with other facilities by removing the the Boolean
value being passed back to Open Access.
This application can be used to provide a 'clean' way of passing
key strokes when a programmer application has finished to bring up the
applications menu again and starting another program (no annoying
'End of Macro' message will appear as would happen when using an OA macro).
It also can be used to resolve problems such as entering a password
automatically and displaying your own help with the Browse screen.

!! If an OA "PROBLEM" window appears OA will clear the keyboard buffer
!! and no further command will be executed.
!! -----
!! NOTE: if a number of calls are made to the two functions,
!! key stroke calls are executed last in first out.
!! -----
!! NOTE: each function key takes 3 characters.

The return value from this Language call is a Boolean.

Functions included:
TYPECHAR - place a character string into the keyboard buffer
TYPEFKEY - place a function key into the keyboard buffer

VAR.OAC
VAR

VOLS.OAC
VOLS

WINDOWS.OAC
DESKTOP - Makes the desktop pop-up
ASCII - Shows the ASCII tabe window.
ERRORWND

WOCHE.OAC
WOCHE - Returns the week number of the date given.

WTAG.OAC
WTAG

OSA CONVERT
 
Liste der Anhänge anzeigen (Anzahl: 2)
E r g e b n i s / R e s u l t

Wandelt eine Zeichenkette in eine Anzahl von Satzfunktionen um
Convert a string in a number of set functions

B e s c h r e i b u n g / D e s c r i p t i o n

The CONVERT function can perform many transformations on a string. These include removing spaces, case conversion and deleting characters. One of the most important options available to the user is the ability to ignore strings enclosed in quotes. So it is possible to request an entire string is converted to uppercase, except for those words in quotes. Two other possible uses of the function are to remove all spaces from a string. This may be useful if you prompt a user for a filename. Another use might be the removal of all but numeric characters. Multiple options can be passed to the routine. Some will turn others off and take precedence over others. (If you would like to suggest other conversion routines to be added to CONVERT, please contact us and let us know your ideas.)

S y n t a x
Code:

answer = call('CONVERT' , string , options)
P a r a m e t e r
string - an Open Access string
options - a string containing multiple options controlling the
transformation of the input string. The options are :-
A - characters enclosed in quotes are not converted.
B - Remove ALL spaces.
C - Remove leading spaces.
D - Remove trailing spaces.
E - Convert all double spaces to just 1 space.
F - Convert to uppercase.
G - Convert to lowercase.
H - Convert to proper ie. capitalise the first letter of each
word and make the rest of the word lowercase.
I - Convert spaces to character 255.
J - Convert all characters < ASCII 32 to spaces.
K - Remove all characters < ASCII 32.
L - Remove all non-numeric characters.

R e t u r n s
A string is returned.

B e i s p i e l / E x a m p l e

Code:

attach 'CONVERT'
a = 'file: myfile. txt' ! test string
option = 'bf' ! Remove all spaces and convert
! to uppercase
put call('CONVERT' , a , option) ! Prints 'FILE:MYFILE.TXT'
a = 'The number is 123' ! test string
option = 'l' ! Remove all non-numeric characters
put call('CONVERT' , a , option) ! Prints '123'
detach 'CONVERT'

Q u e r v e r w e i s / R e f e r e n c e
CVTNUM

OSA CVTNUM
 
Liste der Anhänge anzeigen (Anzahl: 1)
E r g e b n i s / R e s u l t

Wandelt eine Zahl in eine formatierte Zeichenkette um
Converts a number to a formatted string

B e s c h r e i b u n g / D e s c r i p t i o n

Many users have complained that is difficult to read large numbers in an Open Access screen form as there is no grouping (commas to Indicate
thousands.) Also users printing numbers in print forms have requested more options. CVTNUM answers these requests by formatting a number according to the user's requirements. The user can specify the width and precision of the resultant string as well as a number of options that control justification, how to display negative numbers and currency.

S y n t a x

Code:

string = call ('CVTNUM' , value , width , precision , option)
P a r a m e t e r

string - is the returned Open Access string containing the
formatted string.
value - is any integer or decimal value.
width - the user determines how wide the result string will be.
precision - the number of decimal places the result is displayed to.
options - the following options are available -
'A' Justify right
'B' Justify centre
'C' Justify on the decimal point
'D' Place CR or DB after number
'E' Put ( ) around debit values
'F' Put oe at start of number
'G' Put $ at start of number
'H' Put Ÿ at start of number
'I' Put • at start of number
'J' Put ž at start of number
'K' Put DM at end of number
'L' Insert leading zeroes
'M' Grouping

R e t u r n s
A string containing the formatted number

B e i s p i e l / E x a m p l e

Code:


attach 'CONVERT'
put call ('CVTNUM' , 10345.456 , 15 , 2 , 'FM') ! prints oe 10,345.46
detach 'CONVERT'


OSA MAXOF2
 
Liste der Anhänge anzeigen (Anzahl: 1)
E r g e b n i s / R e s u l t

Liefert den Größten von zwei Werten, die zugeteilt wurden
Return the largest of two values passed to it

B e s c h r e i b u n g / D e s c r i p t i o n

MAXOF2 calculates the largest of two values passed to it and returns
the larger.
Integers, decimals and dates may be passed to the routine.

S y n t a x
Code:

larger = call('MAXOF2' , value1 , value2)
P a r a m e t e r

value1
value2 - may be integer, decimal or date values. If dates are involved,
then both values must be dates.

R e t u r n s
The larger of the two values passed to the function.
If dates are passed to the function, then a date is returned.
If two integers are used, then an integer is returned.
If either of the two values is a decimal, then a decimal is returned.

B e i s p i e l / E x a m p l e

Code:


attach 'TOOLS'
put call('MAXOF2' , sysdate , sysdate - 1) ! prints today's date
detach 'TOOLS'

Q u e r v e r w e i s / R e f e r e n c e

MINOF2

OSA FILEXIST
 
Liste der Anhänge anzeigen (Anzahl: 1)
E r g e b n i s / R e s u l t

Prüft, ob eine Datei existiert

B e s c h r e i b u n g / D e s c r i p t i o n

Displays the Open Access Abandon message

S y n t a x
Code:

boolean = CALL("FILEXIST",filename,no/yes)
P a r a m e t e r

Filename - kann mit oder ohne Alias übergeben werden
lookall - no = es wird nur im angegebenen Verzeichnis gesucht
yes = es wird in allen Verzeichnissen geprüft

R e t u r n s

eine logische Variable

B e i s p i e l / E x a m p l e

Code:


attach "filecomp.oac"
fname1 = 'pgm:test1.txt'
fname2 = 'test2.txt'
doit = false
lookall = 'No'
ok = call("filexist",fname1,lookall)
if ok
doit = true
else
lookall = 'Yes'
ok = call("filexist",fname1,lookall)
if ok
doit = true
end if
end if
DETACH "filecomp"


OSA XLATE
 
Liste der Anhänge anzeigen (Anzahl: 1)
E r g e b n i s / R e s u l t

Eine Zeichenkette zu anderen übersetzen
Translate one string to another

B e s c h r e i b u n g / D e s c r i p t i o n

The Translate (XLATE) function alters a string according to rules you pass to it. Although difficult to use at first, this routine is extremely powerful, enabling complex transformations to be made. Using the XLATE function you can replace one or several characters with others. In a sense, this function is similar to the Open Access translate table and printer translation characters.

S y n t a x

Code:

answer = call('XLATE' , string , translate_in , translate_out)
P a r a m e t e r

string - any Open Access string
translate_in - this is a string containing the characters that are to be
translated.
translate_out - this string is the same length as translate_in. It
contains the characters that are used to replace the
characters in translate_in.

R e t u r n s

A string, the same length as the input string.

B e i s p i e l / E x a m p l e

Code:


attach 'CONVERT'
! create a test string
a = 'Jackdaws love my big sphinx of quartz'
! create the translation rules. Every occurrence of lowercase 'a' will be
! translated to 'A'
trans_in = 'abcdefghijklmnopqrstuvwxyz'
trans_out = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
! translate the string into uppercase (although you could use UCASE)
! b will contain JACKDAWS LOVE MY BIG SPHINX OF QUARTZ
b = call ('XLATE' , a , trans_in , trans_out)
! create a test string
a = 'oe 123,456.78'
! create the translation rules. Every occurrence of 'oe' is translated to
! '$', ',' to a space, '.' to ','
trans_in = 'oe,.'
trans_out = '$ ,'
! translate the string. b will contain $ 123 456,78
b = call ('XLATE' , a , trans_in , trans_out)
detach 'CONVERT'
! Incidentally, 'Jackdaws love my big sphinx of quartz' is a pangram ie.
! a sentence containing every letter of the alphabet. At 31 characters
! it is shorter than a well know saying involving small carnivores and
! household pets.


OSA DATCONV1 bis DATCONV9 sowie DATCONVA, DATCONVB, DATCONVC
 
Liste der Anhänge anzeigen (Anzahl: 2)
E r g e b n i s / R e s u l t

Liefert die Zahl des Monats aus einem Datum
Return a month number from a date

B e s c h r e i b u n g / D e s c r i p t i o n

The procedure returns the month number of any date passed to it. Given a date of 28/04/1996, for example, the integer value 4 would be returned.

S y n t a x

Code:

value = call ('DATCONV1' , datefld)
P a r a m e t e r

datefld - Any valid Open Access date.

R e t u r n s

An integer value containing the month number of the date parameter
passed to the routine.

B e i s p i e l / E x a m p l e

Code:

attach 'DATE'
put call ('DATCONV1' , sysdate) ! prints today's month number
detach 'DATE'


DATCONV2
 
E r g e b n i s / R e s u l t

Liefert den Monatsnamen aus einem Datum
Convert a date into it's month name

B e s c h r e i b u n g / D e s c r i p t i o n

When passed a date, this function returns the name of the month of the date. If the function was passed a date of the format '31/12/96' it would return 'December'.

S y n t a x

Code:

string = call ('DATCONV2' , datefld)
P a r a m e t e r

datefld - any Open Access date

R e t u r n s

A string containing a month name.

B e i s p i e l / E x a m p l e

Code:


attach 'DATE'   
put call ('DATCONV2' , sysdate) ! prints today's month name   
detach 'DATE'


DATCONV3
 
E r g e b n i s / R e s u l t

Liefert das Jahr aus einem Datum
Return the year from a date

B e s c h r e i b u n g / D e s c r i p t i o n

When passed a date, this function returns the year. If the function was passed a date of the format '31/12/96' it would return 1996.

S y n t a x

Code:

value = call ('DATCONV3' , datefld)
P a r a m e t e r

datefld - any Open Access date

R e t u r n s

An integer containing the year.

B e i s p i e l / E x a m p l e

Code:


attach 'DATE'
put call ('DATCONV3' , sysdate) ! prints today's year
detach 'DATE'


DATCONV4
 
E r g e b n i s / R e s u l t

Liefert den Tag eines Monats aus einem Datum
Returns the day of the month from a date

B e s c h r e i b u n g / D e s c r i p t i o n

When passed a date, this function returns the day of the month. If the function was passed a date of the format '31/12/96' it would return 31.

S y n t a x

Code:

value = call ('DATCONV4' , datefld)
P a r a m e t e r

datefld - any Open Access date

R e t u r n s

An integer containing the day.

B e i s p i e l / E x a m p l e

Code:


attach 'DATE'   
put call ('DATCONV4' , sysdate) ! prints today's day number   
detach 'DATE'



Alle Zeitangaben in WEZ +1. Es ist jetzt 16:51 Uhr.

Powered by vBulletin® Version 3.8.7 (Deutsch)
Copyright ©2000 - 2024, vBulletin Solutions, Inc.