1, Int(x): Find the largest integer not greater than the independent variable x.
2.Fix(x): Delete the decimal part of floating-point number and keep its integer part.
Hex$(x): Convert decimal number into hexadecimal number.
4.Oct$(x): Convert decimal number into octal number.
5.Asc(x$): Returns the ASCII character of the first character in the string x$.
6.CHR$(x): Convert the value of x into corresponding ASCII characters.
7.Str$(x): Convert the value of x into a string.
8.Cint(x): Round the decimal part of x and convert it into an integer.
9.Ccur(x): Convert the value of x into a currency type value, with 4 decimal places at most and automatic rounding.
10, CDbl(x): converts the value of x into a double-precision number.
1 1, CLng(x): round the decimal part of x and convert it into a long integer.
12, CSng(x): converts the value of x into a single-precision number.
13, Cvar(x): converts the value of x to a value of variant.
14, VarPtr(var): get a pointer to the variable var.
2 Mathematical function
1, Sin(x): returns the sine value of the independent variable x.
2.Cos(x): Returns the cosine of the independent variable x.
3.Tan(x): returns the tangent of the independent variable X.
4.Atn(x): returns the arctangent value of the independent variable X.
5.Abs(x): returns the absolute value of the independent variable x.
6.Sgn(x): Returns the sign of the independent variable x, that is, when x is negative, returns-1; When x is 0, returns.
0; When x is a positive number, 1 is returned.
7.Sqr(x): Returns the square root of the independent variable x, which must be greater than or equal to 0.
8.Exp(x): Returns the value with E as the base and X as the exponent, that is, to find the power of X of E..
2 date and time function
1, Day(Now): returns the current date.
2.WeekDay(Now): Returns the current week.
3.Month(Now): Returns the current month.
4.Year(Now): Returns the current year.
5. Hours (now): Return hours (0~23)
6. Minute (now): Returns the score (0~59)
7. Seconds (now): Return seconds (0~59).
2 random number function
1, Rnd[(x)]: generates a single-precision random number between 0 and 1.
2.Randmize[(x)]: The function is the same as above, but it is better.
2 string function
1, LTrim$ (string): Delete the blank characters on the left side of the string.
2.Rtrim$ (string): Delete the blank characters on the right side of the string.
3.Left$ (string, n): take the n characters in the left part of the string.
4.Right$ (string, n): take the n characters on the right side of the string.
5.Mid$ (string, p, n): take the n characters of the string from position p.
6.Len (string): Test the length of the string.
7.String$(n, string): Returns a string consisting of n characters.
8.Space$(n): n spaces are returned.
9.InStr (string 1, string 2): the string 2 was found in the string 1.
10, Ucase$ (string): converts lowercase letters into uppercase letters.
1 1, Lcase$ (string): converts uppercase letters into lowercase letters.
2 Form input and output functions
1, Print (string): output the string in the form, and you can use "&;". Output after connecting variables.
2.Tab(n): move the cursor to the position where the line starts with n.
3.Spc(n): skip n spaces.
4.Cls: Clear the display content in the current form.
5. Move the upper left corner X, upper left corner Y, width and height: move the form or control.
6.InputBox(prompt, …): a data input window pops up, and the return value is the input value of the window.
7.msgbox (message, [type] ...): a prompt window pops up.
2 file operation function
1, open file name [as mode] [access access type] [locked] as [#] file number [Len= record length]
Function: Allocate buffers for the input and output of files, and determine the access method used by the buffers.
Description:
1) mode: specifies the input and output mode of the file; Optional; The default value is Random, which can be the following values.
A. Output: specify the sequential output mode, which will overwrite the original content.
B. Input: specify the sequential input method.
C. Append: Specify the sequential output mode and append the content to the end of the file.
D. Random: Specify the random access mode, which is also the default mode. In random mode, if there is no access clause, VB will Open files in the following order when executing the open statement: read/write, read-only and write-only.
E, specify the binary file. In this way, Get and Put statements can be used to read and write information at any byte position in the file. In binary mode, if there is no Access clause, the type of open file is the same as that in random mode.
2) Access Type: placed after the keyword access, used to specify the type of access file. Can be one of the following types
A. read: open a read-only file.
B. Write: Open the write-only file.
C, read and write: open the read and write file. This type is only valid for random files, binary files and files opened by appending.
3) Lock: This clause is only used in multi-user or multi-entry environment, which restricts other users or other processes from reading and writing open. Locking types include:
A. Default: If the lock type is not specified, this process can open the file for reading and writing many times; When the file is open, other processes cannot read or write to it.
Lock sharing: Any process on any machine can read and write this file.
Lock read: other processes are not allowed to read the file. This lock is allowed only when no other process with read access type accesses the file.
D lock write: other processes are not allowed to write to the file. This lock is allowed only when no other process with write access type accesses the file.
E-lock reading and writing: other processes are not allowed to read and write this file.
If the lock clause is not used, the default value is Lock Read write.
4) File number: an integer from 1 to 5 1 1 specified by the user, which is legal as long as the file number is not used; After opening the file, you can use the file number to read and write.
5) Record length: it is an integer expression. When this parameter is selected, the record length will be set for random access files. For random access to open files, this value is the record length; For sequential files, this value is the number of buffered characters. The record length cannot exceed 32767 bytes. For binary files, the Len clause is ignored.
Example: Open "price.dat" and the output is # 1.
Open "C:\abc.dat" for radom as # 1 len=256.
2. Close [# document number] [,# document number] ...: Close the document.
3.Seek # file number and location: the file pointer jumps to the specified location in bytes. The value is1~ pow (2,31)-1.
4.Seek (file number): Returns the position of the current file pointer.
5.FreeFile (): Get an unused file number.
6.Loc (file number): Returns the current reading and writing location of the specified file.
7.LOF (file number): Returns the file length.
8.EOF (document number): used to test whether the document is completed, and return true after completion.
9. Print # file number, variable 1, variable 2, … variable n: Write the value of each variable into the sequential file in sequence.
If you are printing # document number, write a blank line.
10, write # file number, expression table ...: same as printing.
1 1, enter # file number, variable table ...: read the sequential file and perform the operation opposite to printing.
12, LININPUT # file number, string variable: read a line from a sequential file.
13, enter $(n, # file number): read a string of n characters from the sequential file.
14, Put # file number, [record number], variable: writes the contents of any variable except object variable and array variable (including subscript variable whose number contains a single array element) into the random file.
For example: Put #2, filebuff
15, Get # file number, [record number], variable: read a random file and perform the opposite operation to put.
16, Get|put # file number, [location], variable: read and write binary file, and location refers to the location of the next read and write operation.
17, Kill file name: delete file.
18. File Copy Source File Name and Target File Name: Copy File.
19, and name the original file name as the new file name: heavy command file.