Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - What does this statement in delphi mean? A: = strtint (copy) (by name field ('menu item'). Asstring, 1, 1)); What do you mean by thank you?
What does this statement in delphi mean? A: = strtint (copy) (by name field ('menu item'). Asstring, 1, 1)); What do you mean by thank you?
FieldByName is an attribute of database control, which means that the name specifies a field. Menu item is the name of the field in the table;

. A string is represented as a character.

Copy is a string function in the format of copy ('string', starting character, several characters).

For example, the return value of copy('abcd', 2, 1) is B, which means that the second letter of the string abcd begins with a letter.

Strtoint is to convert a string into an integer.

A: = stroint (copy (field by name ('menu item')). Asstring, 1, 1));

The meaning of this sentence is

The current value of the "menu item" field, starting from the first character, takes a character, and the result is changed from character type to plastic, and assigned to the variable A.

Above.