The XView Toolkit
229
10
Sample Translation of an XView Function to Pascal
In the section, “Summary of Procedures and Macros,” in the XView
Programming Manual, is the following entry:
If you translate the entry to Pascal, it means:
•
Leave the object data type,
Textsw
, as is.
•
Since the function returns the number of characters inserted, invoke it as an
integer function.
texsw_insert()
Inserts characters in buf into textsw at the current
insertion point. The number of characters actually
inserted is returned. This will equal buf_len unless
there was a memory allocation failure. If there was
a failure, it will return 0.
Textsw_index
textsw_insert(textsw, buf, buf_len)
Textsw
textsw;
char
*buf;
int
buf_len;
...
var
textsw: Textsw ;
buf: array[0..3] of char ;
buf_len: integer;
N:Textsw_index;
begin
...
N := textsw_insert (textsw, buf, buf_len) ;
end.
Содержание SunSoft Pascal 4.0
Страница 14: ...xiv Pascal 4 0 User s Guide ...
Страница 16: ...xvi Pascal 4 0 User s Guide ...
Страница 30: ...6 Pascal 4 0 User s Guide 1 ...
Страница 160: ...136 Pascal 4 0 User s Guide 6 ...
Страница 268: ...244 Pascal 4 0 User s Guide 11 ...
Страница 320: ...296 Pascal 4 0 User s Guide B ...
Страница 331: ...Index 307 ...
Страница 333: ......