Subject: | |
From: | |
Reply To: | Born, Ken |
Date: | Mon, 25 Sep 2000 10:25:25 -0500 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Greetings,
The following program returns the I.P. Address of a client's browser. This
works but, I need to parse the I.P. Address and convert it into the numeric
equivalent. I have the procedure to do this. However, how do I move or
copy the value in a pointer to a string variable?
Here is what I need:
The value in this field env_name := getenv (envtoget); needs to be moved
into a field defined as hold_ipadd : STRING[15]
Pointers have always confused me and copying things or strmove them in
PASCAL trips me up.
Any help would be appreciated...
Thanks....
1 program getenv (input, output);
2
3 TYPE
4
5 char_array = packed array [1..80] of char;
6 char_star = ^char_array;
7
8 VAR
9
10 env_name : char_star;
10.1 envtoget : char_array;
11
12 FUNCTION getenv ( envname : char_array ):char_star;
13 EXTERNAL;
14
15 BEGIN
16
16.1 envtoget := 'SERVER_NAME';
16.2 envtoget[12] := CHR(0);
16.3
17 env_name := getenv (envtoget);
18 IF env_name = NIL THEN
19 writeln('getenv() call failed to get anything...')
20 ELSE
21 writeln('ENV_NAME = ', env_name^);
22
23 END.
24
|
|
|