Browse Source

+ Added function overview

michael 25 years ago
parent
commit
5bceb49d28
2 changed files with 299 additions and 4 deletions
  1. 145 3
      docs/ref.tex
  2. 154 1
      docs/sysutils.tex

+ 145 - 3
docs/ref.tex

@@ -4375,8 +4375,10 @@ with Borland or Turbo Pascal.
 Functions are listed in alphabetical order. Arguments of functions or 
 procedures that are optional are put between square brackets.
 
-The pre-defined constants and variables are listed in the first section. The
-second section contains the supported functions and procedures.
+The pre-defined constants and variables are listed in the first section. 
+The second section contains an overview of all functions, grouped by
+functionality, and the last section contains the supported functions
+and procedures.
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % Types, Constants and Variables
@@ -4697,6 +4699,146 @@ The randomize function uses a seed stored in the \var{RandSeed} variable:
 \end{verbatim}
 This variable is initialized in the initialization code of the system unit.
 
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Functions and Procedures by category
+\section{Function list by category}
+What follows is a listing of the available functions, grouped by category.
+For each function there is a reference to the page where you can find the
+function.
+\subsection{File handling}
+Functions concerning input and output from and to file.
+\begin{funclist}
+\procref{Append}{Open a file in append mode}
+\procref{Assign}{Assign a name to a file}
+\procref{Blockread}{Read data from a file into memory}
+\procref{Blockwrite}{Write data from memory to a file}
+\procref{Close}{Close a file}
+\funcref{Eof}{Check for end of file}
+\funcref{Eoln}{Check for end of line}
+\procref{Erase}{Delete  file from disk}
+\funcref{Filepos}{Position in file}
+\funcref{Filesize}{Size of file}
+\procref{Flush}{Write file buffers to disk}
+\funcref{IOresult}{Return result of last file IO operation}
+\procref{Read}{Read from file into variable}
+\procref{Readln}{Read from file into variable and goto next line}
+\procref{Rename}{Rename file on disk}
+\procref{Reset}{Open file for reading}
+\procref{Rewrite}{Open file for writing}
+\procref{Seek}{Set file position}
+\funcref{SeekEof}{Set file position to end of file}
+\funcref{SeekEoln}{Set file position to end of line}
+\procref{SetTextBuf}{Set size of file buffer}
+\procref{Truncate}{Truncate the file at position}
+\procref{Write}{Write variable to file}
+\procref{WriteLn}{Write variable to file and append newline}
+\end{funclist}
+
+\subsection{Memory management}
+Functions concerning memory issues.
+\begin{funclist}
+\funcref{Addr}{Return address of variable}
+\funcref{Assigned}{Check if a pointer is valid}
+\funcref{CSeg}{Return code segment}
+\procref{Dispose}{Free dynamically allocated memory}
+\funcref{DSeg}{Return data segment}
+\procref{Fillchar}{Fill memory region with certain character}
+\procref{Fillword}{Fill memory region with 16 bit pattern}
+\procref{Freemem}{Release allocated memory}
+\procref{Getmem}{Allocate new memory}
+\procref{GetMemoryManager}{Return current memory manager}
+\funcref{High}{Return highest index of open array or enumerated}
+\funcref{IsMemoryManagerSet}{Is the memory manager set}
+\funcref{Low}{Return lowest index of open array or enumerated}
+\procref{Mark}{Mark current memory position}
+\funcref{Maxavail}{Return size of largest free memory block}
+\funcref{Memavail}{Return total available memory}
+\procref{Move}{Move data from one location in memory to another}
+\procref{New}{Dynamically allocate memory for variable}
+\funcref{Ofs}{Return offset of variable}
+\funcref{Ptr}{Combine segmant and offset to pointer}
+\procref{Release}{Release memory above mark point}
+\funcref{Seg}{Return segment}
+\procref{SetMemoryManager}{Set a memory manager}
+\funcref{Sptr}{Return current stack pointer}
+\funcref{SSeg}{Return ESS register value}
+\end{funclist}
+
+\subsection{Mathematical routines}
+Functions connected to calculating and coverting numbers.
+\begin{funclist}
+\funcref{Abs}{Calculate absolute value}
+\funcref{Arctan}{Calculate inverse tangent}
+\funcref{Cos}{Calculate cosine of angle}
+\procref{Dec}{Decrease value of variable}
+\funcref{Exp}{Exponentiate}
+\funcref{Frac}{Return fractional part of floating point value}
+\funcref{Hi}{Return high byte/word of value}
+\procref{Inc}{Increase value of variable}
+\funcref{Int}{Calculate integer part of floating point value}
+\funcref{Ln}{Calculate logarithm}
+\funcref{Lo}{Return low byte/word of value}
+\funcref{Odd}{Is a value odd or even ? }
+\funcref{Pi}{Return the value of pi}
+\funcref{Power}{Raise float to integer power}
+\funcref{Random}{Generate random number}
+\procref{Randomize}{Initialize random number generator}
+\funcref{Round}{Round floating point value to nearest integer number}
+\funcref{Sin}{Calculate sine of angle}
+\funcref{Sqr}{Calculate the square of a value}
+\funcref{Sqrt}{Calculate the square root of a value}
+\funcref{Swap}{Swap high and low bytes/words of a variable}
+\funcref{Trunc}{Truncate a floating point value}
+\end{funclist}
+
+\subsection{String handling}
+All things connected to string handling.
+\begin{funclist}
+\funcref{BinStr}{Construct binary representation of integer}
+\funcref{Chr}{Convert ASCII code to character}
+\funcref{Concat}{Concatenate two strings}
+\funcref{Copy}{Copy part of a string}
+\procref{Delete}{Delete part of a string}
+\funcref{HexStr}{Construct hexadecimal representation of integer}
+\procref{Insert}{Insert one string in another}
+\funcref{Length}{Return length of string}
+\funcref{Lowercase}{Convert string to all-lowercase}
+\funcref{Pos}{Calculate position of one string in another}
+\procref{SetLength}{Set length of a string}
+\procref{Str}{Convert number to string representation}
+\funcref{StringOfChar}{Create string consisting of a number of characters}
+\funcref{Upcase}{Convert string to all-uppercase}
+\procref{Val}{Convert string to number}
+\end{funclist}
+
+\subsection{Operating System functions}
+Functions that are connected to the operating system.
+\begin{funclist}
+\procref{Chdir}{Change working directory}
+\procref{Getdir}{Return current working directory}
+\procref{Halt}{Halt program execution}
+\funcref{Paramcount}{Number of parameters with which program was called}
+\funcref{Paramstr}{Retrieve parameters with which program was called}
+\procref{Mkdir}{Make a directory}
+\procref{Rmdir}{Remove a directory}
+\procref{Runerror}{Abort program execution with error condition}
+\end{funclist}
+
+\subsection{Miscellaneous functions}
+Functions that do not belong in one of the other categories.
+\begin{funclist}
+\procref{Break}{Abort current loop}
+\procref{Continue}{Next cycle in current loop}
+\procref{Exit}{Exit current function or procedure}
+\procref{LongJmp}{Jump to execution point}
+\funcref{Ord}{Return ordinal value of enumerated type}
+\funcref{Pred}{Return previous value of ordinal type}
+\funcref{SetJmp}{Mark execution point for jump}
+\funcref{SizeOf}{Return size of variable or type}
+\funcref{Succ}{Return next value of ordinal type}
+\end{funclist}
+
+
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % Functions and Procedures
 \section{Functions and Procedures}
@@ -6028,7 +6170,7 @@ created.
 
 Contrary to \tp, \fpc opens the file with mode \var{fmoutput}. If you want
 to get it in \var{fminout} mode, you'll need to do an extra call to 
-\seef{Reset}.
+\seep{Reset}.
 
 \Errors
 If the file cannot be opened for writing, then a run-time error is

+ 154 - 1
docs/sysutils.tex

@@ -27,7 +27,8 @@ the latter, it is designed to work on multiple platforms. It is implemented
 on all supported platforms.
 
 This chapter starts out with a definition of all types and constants 
-that are defined, followed by a complete explanation of each function.
+that are defined, followed by an overview of functions grouped by
+functionality, and lastly the complete explanation of each function.
 
 \section{Constants and types}
 
@@ -197,6 +198,158 @@ Const
 {$endif}
 \end{verbatim}
 
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Functions and procedures by category
+\section{Function list by category}
+What follows is a listing of the available functions, grouped by category.
+For each function there is a reference to the page where you can find the
+function.
+
+\subsection{String functions}
+Functions for handling strings.
+\begin{funclist}
+\funcref{AnsiCompareStr}{Compare two strings}
+\funcref{AnsiCompareText}{Compare two strings, case insensitive}
+\funcref{AnsiExtractQuotedStr}{Removes quotes from string}
+\funcref{AnsiLastChar}{Get last character of string}
+\funcref{AnsiLowerCase}{Convert string to all-lowercase}
+\funcref{AnsiQuotedStr}{Qoutes a string}
+\funcref{AnsiStrComp}{Compare strings case-sensitive}
+\funcref{AnsiStrIComp}{Compare strings case-insensitive}
+\funcref{AnsiStrLComp}{Compare L characters of strings case sensitive}
+\funcref{AnsiStrLIComp}{Compare L characters of strings case insensitive}
+\funcref{AnsiStrLastChar}{Get last character of string}
+\funcref{AnsiStrLower}{Convert string to all-lowercase}
+\funcref{AnsiStrUpper}{Convert string to all-uppercase}
+\funcref{AnsiUpperCase}{Convert string to all-uppercase}
+\procref{AppendStr}{Append 2 strings}
+\procref{AssignStr}{Assign value of strings on heap}
+\funcref{CompareStr}{Compare two strings case sensitive}
+\funcref{CompareText}{Compare two strings case insensitive}
+\procrefl{DisposeStr}{DisposeStrSys}{Remove string from heap}
+\funcref{IsValidIdent}{Is string a valid pascal identifier}
+\funcref{LeftStr}{Get first N characters of a string}
+\funcref{LoadStr}{Load string from resources}
+\funcref{LowerCase}{Convert string to all-lowercase}
+\funcrefl{NewStr}{NewStrSys}{Allocate new string on heap}
+\funcref{RightStr}{Get last N characters of a string}
+\funcrefl{StrAlloc}{StrAllocSys}{Allocate memory for string}
+\funcref{StrBufSize}{Reserve memory for a string}
+\procrefl{StrDispose}{StrDisposeSys}{Remove string from heap}
+\funcrefl{StrPas}{StrPasSys}{Convert PChar to pascal string}
+\funcrefl{StrPCopy}{StrPCopySys}{Copy pascal string}
+\funcrefl{StrPLCopy}{StrPLCopySys}{Copy N bytes of pascal string}
+\funcref{UpperCase}{Convert string to all-uppercase}
+\end{funclist}
+
+\subsection{Formatting strings}
+Functions for formatting strings. 
+\begin{funclist}
+\funcref{AdjustLineBreaks}{Convert line breaks to line breaks for system}
+\funcref{FormatBuf}{Format a buffer}
+\funcref{Format}{Format arguments in string}
+\procref{FmtStr}{Format buffer}
+\funcref{QuotedStr}{Quote a string}
+\funcref{StrFmt}{Format arguments in a string}
+\funcref{StrLFmt}{Format maximum L characters in a string}
+\funcref{TrimLeft}{Remove whitespace at the left of a string}
+\funcref{TrimRight}{Remove whitespace at the right of a string}
+\funcref{Trim}{Remove whitespace at both ends of a string}
+\end{funclist}
+
+\subsection{File input/output routines}
+Functions for reading/writing to file.
+\begin{funclist}
+\funcref{FileCreate}{Create a file and return handle}
+\funcref{FileOpen}{Open file end return handle}
+\funcref{FileRead}{Read from file}
+\funcref{FileSeek}{Set file position}
+\funcref{FileTruncate}{Truncate file length}
+\funcref{FileWrite}{Write to file}
+\procref{FileClose}{Close file handle}
+\end{funclist}
+
+\subsection{File handling routines}
+Functions for file manipulation.
+\begin{funclist}
+\funcref{AddDisk}{Add sisk to list of disk drives}
+\funcref{ChangeFileExt}{Change extension of file name}
+\funcref{CreateDir}{Create a directory}
+\funcref{DeleteFile}{Delete a file}
+\funcrefl{DiskFree}{DiskFreeSys}{Free space on disk}
+\funcrefl{DiskSize}{DiskSizeSys}{Total size of disk}
+\funcref{ExpandFileName}{Create full file name}
+\funcref{ExpandUNCFileName}{Create full UNC file name}
+\funcref{ExtractFileDir}{Extract directory part of filename}
+\funcref{ExtractFileDrive}{Extract drive part of filename}
+\funcref{ExtractFileExt}{Extract extension part of filename}
+\funcref{ExtractFileName}{Extract name part of filename}
+\funcref{ExtractFilePath}{Extrct path part of filename}
+\funcref{ExtractRelativePath}{Construct relative path between two files}
+\funcref{FileAge}{Return file age}
+\funcref{FileDateToDateTime}{Convert file date to system date}
+\funcref{FileExists}{Determine whether a file exists on disk}
+\funcref{FileGetAttr}{Get attributes of file}
+\funcref{FileGetDate}{Get date of last file modification}
+\funcref{FileSearch}{Search for file in path}
+\funcrefl{FileSetAttr}{FileSetAttr}{Get file attributes}
+\funcrefl{FileSetDate}{FileSetDate}{Get file dates}
+\funcref{FindFirst}{Start finding a file}
+\funcref{FindNext}{Find next file}
+\funcref{GetCurrentDir}{Return current working directory}
+\funcref{RemoveDir}{Remove a directory from disk}
+\funcref{RenameFile}{Rename a file on disk}
+\funcref{SetCurrentDir}{Set current working directory}
+\funcref{SetDirSeparators}{Set directory separator characters}
+\procrefl{FindClose}{FindCloseSys}{Stop searching a file}
+\procref{DoDirSeparators}{Replace directory separator characters}
+\end{funclist}
+
+\subsection{Date/time routines}
+Functions for date and time handling.
+\begin{funclist}
+\funcref{DateTimeToFileDate}{Convert DateTime type to file date}
+\funcref{DateTimeToStr}{Construct string representation of DateTime}
+\procref{DateTimeToString}{Construct string representation of DateTime}
+\procref{DateTimeToSystemTime}{Convert DateTime to system time}
+\funcref{DateTimeToTimeStamp}{Convert DateTime to timestamp}
+\funcref{DateToStr}{Construct string representation of date}
+\funcref{Date}{Get current date}
+\funcref{DayOfWeek}{Get day of week}
+\procref{DecodeDate}{Decode DateTime to year month and day}
+\procref{DecodeTime}{Decode DateTime to hours, minutes and seconds}
+\funcref{EncodeDate}{Encode year, day and month to DateTime}
+\funcref{EncodeTime}{Encode hours, minutes and seconds to DateTime}
+\funcref{FormatDateTime}{Return string representation of DateTime}
+\funcref{IncMonth}{Add 1 to month}
+\funcref{IsLeapYear}{Determine if year is leap year}
+\funcref{MSecsToTimeStamp}{Convert nr of milliseconds to timestamp}
+\funcref{Now}{Get current date and time}
+\funcref{StrToDateTime}{Convert string to DateTime}
+\funcref{StrToDate}{Convert string to date}
+\funcref{StrToTime}{Convert string to time}
+\funcref{SystemTimeToDateTime}{Convert system time to datetime}
+\funcref{TimeStampToDateTime}{Convert time stamp to DateTime}
+\funcref{TimeStampToMSecs}{Convert Timestamp to number of millicseconds}
+\funcref{TimeToStr}{return string representation of Time}
+\funcref{Time}{Get current tyme}
+\end{funclist}
+
+\section{Miscellaneous conversion routines}
+Functions for various conversions.
+\begin{funclist}
+\funcref{BCDToInt}{Convert BCD number to integer}
+\funcref{CompareMem}{Compare two memory regions}
+\funcref{FloatToStrF}{Convert float to formatted string}
+\funcref{FloatToStr}{Convert float to string}
+\funcref{FloatToText}{Convert float to string}
+\funcref{GetDirs}{Split string in list of directories}
+\funcref{IntToHex}{return hexadecimal representation of integer}
+\funcref{IntToStr}{return decumal representation of integer}
+\funcref{StrToIntDef}{Convert string to integer with default value}
+\funcref{StrToInt}{Convert string to integer}
+\end{funclist}
+
 \section{Date and time functions}
 
 \subsection{Date and time formatting characters}