* equal and not equal
@ 2005-09-01 17:36 TC
2005-09-01 18:02 ` Florian Weimer
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: TC @ 2005-09-01 17:36 UTC (permalink / raw)
how translate = and /= for pointer use?
and := ?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: equal and not equal
2005-09-01 17:36 equal and not equal TC
@ 2005-09-01 18:02 ` Florian Weimer
2005-09-01 18:22 ` Björn Persson
2005-09-01 18:23 ` Pascal Obry
2005-09-02 15:20 ` Martin Krischik
2 siblings, 1 reply; 6+ messages in thread
From: Florian Weimer @ 2005-09-01 18:02 UTC (permalink / raw)
> how translate = and /= for pointer use?
> and := ?
What do you mean by "for pointer use"?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: equal and not equal
2005-09-01 18:02 ` Florian Weimer
@ 2005-09-01 18:22 ` Björn Persson
0 siblings, 0 replies; 6+ messages in thread
From: Björn Persson @ 2005-09-01 18:22 UTC (permalink / raw)
Florian Weimer wrote:
>>how translate = and /= for pointer use?
>>and := ?
>
> What do you mean by "for pointer use"?
And what do you want to translate from, and what do you want to
translate to?
--
Bj�rn Persson PGP key A88682FD
omb jor ers @sv ge.
r o.b n.p son eri nu
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: equal and not equal
2005-09-01 17:36 equal and not equal TC
2005-09-01 18:02 ` Florian Weimer
@ 2005-09-01 18:23 ` Pascal Obry
2005-09-02 15:20 ` Martin Krischik
2 siblings, 0 replies; 6+ messages in thread
From: Pascal Obry @ 2005-09-01 18:23 UTC (permalink / raw)
TC a ï¿œcrit :
> how translate = and /= for pointer use?
> and := ?
I bet you have a pointer to a data structure and want to use = or /= on
the content (and not on the pointer itself). Use .all.
type PA is access String;
A, B : PA := new String'("azerty");
if A.all = B.all then
...
Also to assign a value to the pointer :
A.all := (others => ' ');
-- All char of A.all are set to space
Note that
A.all := "qw";
Will raise Constraint_Error as A.all is 6 chars long not 2.
You can omit the .all if using a slice :
A (1 .. 2) := "qw";
Pascal.
--
--|------------------------------------------------------
--| Pascal Obry Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--| http://www.obry.net
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: equal and not equal
2005-09-01 17:36 equal and not equal TC
2005-09-01 18:02 ` Florian Weimer
2005-09-01 18:23 ` Pascal Obry
@ 2005-09-02 15:20 ` Martin Krischik
2005-09-02 15:36 ` Martin Krischik
2 siblings, 1 reply; 6+ messages in thread
From: Martin Krischik @ 2005-09-02 15:20 UTC (permalink / raw)
TC wrote:
> how translate = and /= for pointer use?
> and := ?
http://en.wikibooks.org/wiki/Ada_Programming/Types/access
Martin
--
mailto://krischik@users.sourceforge.net
Ada programming at: http://ada.krischik.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: equal and not equal
2005-09-02 15:20 ` Martin Krischik
@ 2005-09-02 15:36 ` Martin Krischik
0 siblings, 0 replies; 6+ messages in thread
From: Martin Krischik @ 2005-09-02 15:36 UTC (permalink / raw)
Martin Krischik wrote:
> TC wrote:
>
>> how translate = and /= for pointer use?
>> and := ?
>
> http://en.wikibooks.org/wiki/Ada_Programming/Types/access
Actually, once you read the module you will understand that you don't
compare access types in Ada.
Martin
--
mailto://krischik@users.sourceforge.net
Ada programming at: http://ada.krischik.com
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-09-02 15:36 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-01 17:36 equal and not equal TC
2005-09-01 18:02 ` Florian Weimer
2005-09-01 18:22 ` Björn Persson
2005-09-01 18:23 ` Pascal Obry
2005-09-02 15:20 ` Martin Krischik
2005-09-02 15:36 ` Martin Krischik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox