* Help: What's happening here?
@ 2001-09-09 21:35 chris.danx
2001-09-10 8:49 ` Emmanuel Briot
0 siblings, 1 reply; 3+ messages in thread
From: chris.danx @ 2001-09-09 21:35 UTC (permalink / raw)
Hi,
Curiously this code doesn't work. GNAT spit's out the error "ces" not
declared in "unicode", but it is, since the "withs" work ok. It's just when
it's renamed or used...
e.g.
unicode.ces.basic_8bit.to_utf32 (blah)
doesn't work when i compile it! Nor does a renaming like below...
The package body looks like this (playing with XML/Ada)
with unicode.ces;
with unicode.ces.basic_8bit;
package body preferences.conversions.unicode is
package basic_8bt renames unicode.ces.basic_8bit;
-- takes a latin1 string and converts it to a
-- unicode encoded (utf16) string;
--
function to_unicode_string (str : in string)
return utf16_string is
begin
return str; -- temp! Must fix
end to_unicode_string;
...
end preferences.conversions.unicode;
and just in case the spec
with unicode.ces.utf16;
use unicode.ces.utf16;
package preferences.conversions.unicode is
-- takes a latin1 string and converts it to a
-- unicode encoded (utf16) string;
--
function to_unicode_string (str : in string)
return utf16_string;
...
end preferences.conversions.unicode;
There's obviouly a rule of some sort I'm not familiar with, could someone
please enlighten me?
Thanks,
Chris
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Help: What's happening here?
2001-09-09 21:35 Help: What's happening here? chris.danx
@ 2001-09-10 8:49 ` Emmanuel Briot
2001-09-10 12:16 ` chris.danx
0 siblings, 1 reply; 3+ messages in thread
From: Emmanuel Briot @ 2001-09-10 8:49 UTC (permalink / raw)
"chris.danx" <chris.danx@ntlworld.com> writes:
> The package body looks like this (playing with XML/Ada)
>
> with unicode.ces;
> with unicode.ces.basic_8bit;
>
> package body preferences.conversions.unicode is
>
> package basic_8bt renames unicode.ces.basic_8bit; <<<<<<<
>
> -- takes a latin1 string and converts it to a
> -- unicode encoded (utf16) string;
> --
> function to_unicode_string (str : in string)
> return utf16_string is
> begin
> return str; -- temp! Must fix
> end to_unicode_string;
The unicode package that GNAT see on the <<<<< line is the package
Preferences.Conversions.Unicode, not the one from XML/Ada.
You have to use something like
package basic_8bt renames standard.unicode.ces.basic_8bit;
if you want to access XML/Ada.
Emmanuel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Help: What's happening here?
2001-09-10 8:49 ` Emmanuel Briot
@ 2001-09-10 12:16 ` chris.danx
0 siblings, 0 replies; 3+ messages in thread
From: chris.danx @ 2001-09-10 12:16 UTC (permalink / raw)
>
> The unicode package that GNAT see on the <<<<< line is the package
> Preferences.Conversions.Unicode, not the one from XML/Ada.
> You have to use something like
>
> package basic_8bt renames standard.unicode.ces.basic_8bit;
>
> if you want to access XML/Ada.
Thanks,
Chris
>
> Emmanuel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2001-09-10 12:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-09 21:35 Help: What's happening here? chris.danx
2001-09-10 8:49 ` Emmanuel Briot
2001-09-10 12:16 ` chris.danx
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox