29
CHAPTER 1 BASIC FUNCTIONS
1.17.2
Referring to Variable of C Language
C language variables can be specified using the same descriptions as in the source
program written in C language.
■
Specifying C Language Variables
C language variables can be specified using the same descriptions as in the source program. The address of C
language variables should be preceded by the ampersand symbol "&". Some examples are shown in the Table
Table 1.17-1 Examples of Specifying Variables
Example of Variables
Example of
Specifying
Variables
Semantics
Regular Variable
int data;
data
Value of data
Pointer
char *p;
*p
Value pointed to by p
Array
char a[5];
a[1]
Value of second element of a
Structure
struct stag {
char c;
int i;
};
struct stag st;
struct stag *stp;
st.c
stp- >c
Value of member c of st
Value of member c of the structure
to which stp points
Union
union utag {
char c;
int i;
} uni;
uni.i
Value of member i of uni
Address of variable
int data;
&data
Address of data
Reference type
int i;
int &ri = i;
ri Same
as
i
Содержание SOFTUNE F2 MC-16
Страница 2: ......
Страница 3: ...FUJITSU SEMICONDUCTOR LIMITED F2 MC 16 FAMILY SOFTUNETM Workbench USER S MANUAL ...
Страница 4: ......
Страница 8: ...iv ...
Страница 14: ...x ...
Страница 84: ...70 CHAPTER 2 DEPENDENCE FUNCTIONS Note The F2 MC 16 16H only allows this setup in the debugging mode ...
Страница 342: ...328 CHAPTER 2 DEPENDENCE FUNCTIONS ...
Страница 343: ...329 INDEX INDEX The index follows on the next page This is listed in alphabetic order ...
Страница 352: ...338 INDEX ...
Страница 354: ......