Detailed explanation of the hottest character arra

2022-09-30
  • Detail

Detailed explanation of the practice of character arrays -

Basic 1: function

such arrays require a very important function, namely extract (string, position, length). This function is used to extract characters indicating the number of words (length) from the specified position of a string. Example:

string=abcdefghijk, po=2, len=3, then extract (string, Po, len) =bcd ---- until normal, extract 3 consecutive characters from the second position

string=chinese, a=5, len=1, then extract (string, a, len) =a ---- extract 1 character from the fifth position

this function is used as follows:

ring is a string variable, position Length is actually a high-value variable in mobile phones that can actually use leather. They can be direct variables or expressions. If position takes decimals, it will be rounded down, that is, it will lose decimals (but if it is less than 1, it will be rounded up to 1). If length takes decimals, it will be rounded up, that is, it will be rounded up to one digit. That is: extract (string, 0.2,1.2) =extract (string, 0.8,1.9) =extract (string, 1.2,1.01) =extract (string, 1.9,1,9) =extract (string, 1,2)

b. set the total length of string as len_ String, there are:

position=0, operation error, but no prompt

sition len_ String, operation error, prompt

position+len tooth destruction GTH len_ String+1, operation error, prompt

ngth=0, meaningless (equivalent to error), no prompt

because characters include numbers and letters, numbers themselves are also a kind of characters. However, if the value of variable a is a number, it may be a numeric variable (integer, real) or a character variable. If it is a numeric variable, it cannot be used as the source string of extract function, and must be converted to a string variable before it can be used. For this reason, proe provides a function specially used for this kind of conversion, that is ITOs (int), namely "int to string"

The variable int of

itos (int) is a numeric variable or expression. If the value of int is non integer, the system will round it first and then convert it. Example: ITOs (1.2) = ITOs (1.0) = character "1"; ITOs (1.5) = ITOs (1.9) = character "2"

basic 2: sketching insert text uses the parameter

the function in front of PROE2001, but this one is new in wildfire version. Therefore, this array cannot be implemented in 2001 Version

this new function is that when sketching and inserting text, the text content can reference the defined parameters. In this way, we can control the content of the text by controlling the value of the parameter, which can be related to idx1 and idx2. Therefore, the sketched text can be represented as different content in different array sub features. See the figure below:

g

screen Width*0.7) {this.resized=true; this.width=screen.width*0. (3) steel wire 7; this.alt='Click to view the full picture in a new window nctrl+ mouse wheel zoom in or out';} "Border=0>

the basis of its implementation is analyzed above. Next, we will comment on these examples and attach parts. Friends can understand the implementation and application of this array through the idea of comments and the attached parts

Copyright © 2011 JIN SHI