Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Tom Rettigs Library - peek...(<c segment>, <c|n offset>) http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 PEEK...(<C segment>, <C|N offset>)
 Reads data stored at specified location in memory.
 Returns <exp> value of data type at requested location.

 <segment> is the segment address of a memory location
    expressed as a 4-byte hexadecimal string.
 <offset> is the offset address of a memory location
    expressed as either 4-byte hexadecimal string or integer.

 Useful for simulating data types and structures not supported by Clipper.

 The following PEEK...() functions are available:

 Function    Returns
 --------    --------------------------------
 PEEKBYTE()  1-byte hex string
 PEEKCHAR()  1-byte ASCII character
 PEEKINT()   2-byte integer
 PEEKLONG()  4-byte integer
 PEEKDBL()   8-byte floating-point number
 PEEKSTR()   null-terminated character string

 See the sample program Country.prg, and example under ALLOCATE().

 Hazard
    Using PEEKSTR() where there is no null terminator to end the
    string will have unpredictable results.


             Placed in the Public Domain by Tom Rettig Assoc.

See Also: ALLOCATE() DEALLOC() DOSFUNC POKE...() ROMBIOS

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson