Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.acorn.programmer > #563
| From | Martin <News03@avisoft.f9.co.uk> |
|---|---|
| Subject | Re: A$= $ptr% Test |
| Newsgroups | comp.sys.acorn.programmer |
| Date | 2011-07-14 15:32 +0100 |
| Message-ID | <51f2b4a922News03@avisoft.f9.co.uk> (permalink) |
| References | <ecf590f251.cferris@cferris.freeuk.com> |
| Organization | None |
On 14 Jul, in article <ecf590f251.cferris@cferris.freeuk.com>,
<cferris@freeRemoveuk.com.invalid> wrote:
> With ref to 'A$ = $Ptr%'
> Is there anyway of test before using this to make sure - it is not
> trying to work with rubish information?
Not sure what you are asking. The statement WILL work with whatever you
give it (assuming ptr% is a valid pointer to accessible memory), and read
a string from ptr% to the first &D, whatever is in that string.
For example, with !Reporter running, the little program
10 : ptr% = PAGE+1:REM test
20 : A$ = $ptr%
30 : *Report ~ptr% A$
will show in the Reporter window
~ptr%=&8F01 A$="[00][0A][13]ptr%=+1:ô test"
which is just what the 'string' is at ptr%. The [] enclose unprintable
hex.
If you need the string to be all normal characters, then either you need
to be careful when the string is written, of validate it when you read it.
Martin
--
Martin Avison
Note that unfortunately this email address will become invalid
without notice if (when) any spam is received.
Back to comp.sys.acorn.programmer | Previous | Next — Previous in thread | Find similar | Unroll thread
A$= $ptr% Test cferris@freeRemoveuk.com.invalid - 2011-07-14 09:02 +0100
Re: A$= $ptr% Test Steve Drain <steve@kappa.me.uk> - 2011-07-14 11:19 +0100
Re: A$= $ptr% Test cferris@freeRemoveuk.com.invalid - 2011-07-14 12:57 +0100
Re: A$= $ptr% Test Paul Sprangers <Paul@sprie.nl> - 2011-07-14 14:14 +0200
Re: A$= $ptr% Test "Ste (news)" <steve@revi11.plus.com> - 2011-07-14 13:46 +0100
Re: A$= $ptr% Test Gazza <usenet@garethlock.com> - 2011-08-14 04:54 -0700
Re: A$= $ptr% Test Martin <News03@avisoft.f9.co.uk> - 2011-08-14 15:34 +0100
Re: A$= $ptr% Test Gazza <usenet@garethlock.com> - 2011-08-14 08:39 -0700
Re: A$= $ptr% Test Gazza <usenet@garethlock.com> - 2011-08-14 17:11 -0700
Re: A$= $ptr% Test Steve Drain <steve@kappa.me.uk> - 2011-08-15 12:30 +0100
Re: A$= $ptr% Test Martin Wuerthner <spamtrap@mw-software.com> - 2011-07-14 13:16 +0200
Re: A$= $ptr% Test Martin <News03@avisoft.f9.co.uk> - 2011-07-14 15:32 +0100
csiph-web