Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Other functions of Function
Other functions of Function

Plays the role of keyword in some programming languages. For example, in Delphi, it is the keyword of function declaration, for example, functionadd(a:integer;b:integer):integer; begin result:=a+ b;end; Function function identifier in pascal, argument type, meaning, result type

abs integer and real absolute values ??are the same as independent variables

arctan integer and real types are practical anyway type

cos integer type, real type cosine real type

exp integer type, real type exponent real type

frac integer type, real type fractional part real type

int integer, real integer partial real type

ln integer, real natural logarithm real type

pi no independent variable pi real type< /p>

sin Integer type, real type sine real type

sqr Integer type, real type square root same as independent variable

sqrt Integer type, real type square root real type

p>

Example: abs(-4)=4 abs(-7.49)=7.49 arctan(0)=0.0

sin(pi)=0.0 cos(pi)=-1.0 frac(- 3.71)=-0.71

int(-3.71)=-3.0 sqr⑷=16 sqrt⑷=2 Function identifier argument type meaning result type

odd integer judgment odd number Boolean< /p>

pred Finds the previous convergent independent variables of the discrete type

succ Finds the same independent variables of the discrete type

Example: odd(1000)=false pred(2000)=1999 succ(2000)=2001

odd⑶=true pred('x')='w succ('x')='y' Function identifier argument type meaning result type

chr byte character type corresponding to the argument

ord sequence number corresponding to the discrete type argument longint

round real type rounding longint

trunc real type truncation Integer longint

Example: chr(66)='B' ord('A')=65 round(-4.3)=-5 trunc(2.88)=2 Function identifier argument type meaning result type

random has no independent variable [random real number real between 0 and 1

random word [0, a random integer between independent variables) word

randomize has no self Variable initialization internal random number generator longint

upcase character type changes lowercase English letters to uppercase character type

downcase character type changes lowercase English letters to uppercase character type

SYSTEM TP's runtime library includes commonly used standard functions and procedures, which can be used directly in the program without USES statement instructions.

DOS has functions such as date, time, directory search, and program execution

CRT has functions such as screen mode control, extended keyboard codes, colors, windows, and sounds

PRINTER supports printout operations.

GRAPH is an advanced graphics software package that supports a variety of graphics adapters.

GRAPH3 is a graphics software package that implements TP3.0.

TURBO3 is compatible with the source program of TP3.0.

OVERLAY implements advanced coverage management

Common procedures and functions of SYSTEM unit

ABS(X) F finds the absolute value of a variable

ADDR (X) F Measured variable address

APPEND(F) P Open an existing text file and point the file pointer to the end of the file to add elements

ARCTAN(X) F Arctangent

ASSIGN(F,C) P Assign the external file name represented by the string C to the file variable F

ASSIGNED(X) P Test whether the pointer or variable in the program is Empty

BLOCKREAD(F,D,NUM) P Read type file.

BLOCKWRITE(F,D,NUM) P Write untyped file

BREAK P Abort or end the loop

CHDIR(PATH) P Change the current directory

p>

CHR(X) F Find the character with ASCⅡ code value X

CLOSE(F) P Close the file

CONCAT(S1,S2...S3) F String merging

CONTINUE P Continue looping

COPY(S,POS,LEN) F Returns a substring of a string

COS(X) F cosine Function

CSEG F Returns the current value of the CS register

DEC(X) F X:=X-1

DELETE(S,POS,LEN) P Delete A substring of a string

DISPOSE(P) P Releases a dynamic variable

DSEG F Returns the current value of the DS register

EOF(F) F Judgment Whether the file ends

EOLN(F) F Determines whether a line in the file type ends

ERASE(F) P Delete an existing external file.