Navigation:  thinBasic language > Modules > Core > Pointers >

PEEK$

Previous pageReturn to chapter overviewNext page

 

Description

 

Return sequence of bytes at a specified memory location.

 

Syntax

 

s = PEEK$([ASCIIZ, ] address, count)

 

Returns

 

String

 

Parameters

 

Name

Type

Optional

Meaning

ASCIIZ

Command

Yes

Optional parameter indicating that address is to be considered a pointer to a NULL terminated string.

If ASCIIZ is specified, PEEK$ reads successive characters from an ASCIIZ buffer of the specified size, until a terminating $NUL (CHR$(0)) byte is found.  Since ASCIIZ strings must contain a terminating $NUL, the maximum length of the returned string is 1 character less than the specified size.

Address

Numeric

No

A valid 32-bit memory address specifying the location in memory where data retrieval should begin

Count

Numeric

No

A numeric expression that specifies the number of consecutive bytes to be read from memory starting at address

 

Remarks

 

Restrictions

 

See also

 

STRPTR, VARPTR, POKE$, POKE, PEEK$, PEEK

 

Examples

 

 

 

 

 

© 2004-2008 thinBasic. All rights reserved. Version 1.6.0.10 Web Site: http://www.thinbasic.com