comp.lang.ada
 help / color / mirror / Atom feed
* span string.
@ 2005-04-22 17:18 Doker
  2005-04-22 18:44 ` Marc A. Criley
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Doker @ 2005-04-22 17:18 UTC (permalink / raw)


I have string like that "abc1020"
haw can i make it a string of fixed lenght of 10 chars like "   abc1020"?
"abc" => "       abc" 
"4" => "         4"
"1234567uui" => "1234567uui"



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: span string.
  2005-04-22 17:18 span string Doker
@ 2005-04-22 18:44 ` Marc A. Criley
  2005-04-22 20:31   ` Doker
  2005-04-23  4:10 ` Jeffrey Carter
  2005-04-23 14:14 ` Doker
  2 siblings, 1 reply; 11+ messages in thread
From: Marc A. Criley @ 2005-04-22 18:44 UTC (permalink / raw)


Doker wrote:
> I have string like that "abc1020"
> haw can i make it a string of fixed lenght of 10 chars like "   abc1020"?
> "abc" => "       abc" "4" => "         4"
> "1234567uui" => "1234567uui"

See the procedure "Move" in package Ada.Strings.Fixed.

     Move("abc1020", String_10, Justify => Right);
     Move("abc", String_10, Justify => Right);
     Move("4", String_10, Justify => Right);
     Move("1234567uui", String_10, Justify => Right);

(Move also has other parameters for what pad character to use, and what 
to do if the source string is longer than the target.)

Marc A. Criley
www.mckae.com



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: span string.
  2005-04-22 18:44 ` Marc A. Criley
@ 2005-04-22 20:31   ` Doker
  2005-04-22 23:45     ` Marius Amado Alves
                       ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Doker @ 2005-04-22 20:31 UTC (permalink / raw)


Can you tell me any site where i can find a list of all standard packages with 
all procedures and functions listed - with 3 words of explenation? 




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: span string.
  2005-04-22 20:31   ` Doker
@ 2005-04-22 23:45     ` Marius Amado Alves
  2005-04-23  6:39     ` Martin Krischik
  2005-04-25 14:02     ` Peter Hermann
  2 siblings, 0 replies; 11+ messages in thread
From: Marius Amado Alves @ 2005-04-22 23:45 UTC (permalink / raw)
  To: comp.lang.ada

On 22 Apr 2005, at 21:31, Doker wrote:

> Can you tell me any site where i can find a list of all standard 
> packages with all procedures and functions listed - with 3 words of 
> explenation?

Yes. The RM. Online at various places, e.g. adaic.org

The list of packages is the front of Annex A. The three words of 
explanation for subprograms are the declarations themselves.




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: span string.
  2005-04-22 17:18 span string Doker
  2005-04-22 18:44 ` Marc A. Criley
@ 2005-04-23  4:10 ` Jeffrey Carter
  2005-04-23 14:14 ` Doker
  2 siblings, 0 replies; 11+ messages in thread
From: Jeffrey Carter @ 2005-04-23  4:10 UTC (permalink / raw)


Doker wrote:

> I have string like that "abc1020"
> haw can i make it a string of fixed lenght of 10 chars like "   abc1020"?
> "abc" => "       abc" "4" => "         4"
> "1234567uui" => "1234567uui"

subtype String_10 is String (1 .. 10);

function To_10 (S : String) return String_10 is
    -- null;
begin -- To_10
    if S'Length >= 10 then
       return S (S'First .. S'First + 9);
    else
       return String'(1 .. 10 - S'Length => ' ') & S;
    end if;
end To_10;

-- 
Jeff Carter
"Every sperm is sacred."
Monty Python's the Meaning of Life
55



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: span string.
  2005-04-22 20:31   ` Doker
  2005-04-22 23:45     ` Marius Amado Alves
@ 2005-04-23  6:39     ` Martin Krischik
  2005-04-23 15:43       ` Steve
  2005-04-25 14:02     ` Peter Hermann
  2 siblings, 1 reply; 11+ messages in thread
From: Martin Krischik @ 2005-04-23  6:39 UTC (permalink / raw)


Doker wrote:

> Can you tell me any site where i can find a list of all standard packages
> with all procedures and functions listed - with 3 words of explenation?

Inside the RM of course:

http://en.wikipedia.org/wiki/ISO_8652

Martin

-- 
mailto://krischik@users.sourceforge.net
Ada programming at: http://ada.krischik.com




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: span string.
  2005-04-22 17:18 span string Doker
  2005-04-22 18:44 ` Marc A. Criley
  2005-04-23  4:10 ` Jeffrey Carter
@ 2005-04-23 14:14 ` Doker
  2 siblings, 0 replies; 11+ messages in thread
From: Doker @ 2005-04-23 14:14 UTC (permalink / raw)


thanks a lot guys <ok>



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: span string.
  2005-04-23  6:39     ` Martin Krischik
@ 2005-04-23 15:43       ` Steve
  2005-04-23 19:59         ` Martin Krischik
  2005-04-24 13:01         ` Stephen Leake
  0 siblings, 2 replies; 11+ messages in thread
From: Steve @ 2005-04-23 15:43 UTC (permalink / raw)


It would be nice to have a good explanation of each routine of each unit in 
the standard library described in Annex A.

I use the information that is in the RM as much as I can, but often find 
that questions go unanswered.  Often resulting in writing small test 
programs or looking at GNAT source files to try to figure out what a routine 
does or how to use it.

It seems like the Wiki would be an ideal place to elaborate on each of the 
functions/procedures and their use.

Any chance the RM could be converted to Wiki form so that explanations could 
be added where needed?

Steve
(The Duck)


"Martin Krischik" <krischik@users.sourceforge.net> wrote in message 
news:1970392.kVO4lUF19A@linux1.krischik.com...
> Doker wrote:
>
>> Can you tell me any site where i can find a list of all standard packages
>> with all procedures and functions listed - with 3 words of explenation?
>
> Inside the RM of course:
>
> http://en.wikipedia.org/wiki/ISO_8652
>
> Martin
>
> -- 
> mailto://krischik@users.sourceforge.net
> Ada programming at: http://ada.krischik.com
> 





^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: span string.
  2005-04-23 15:43       ` Steve
@ 2005-04-23 19:59         ` Martin Krischik
  2005-04-24 13:01         ` Stephen Leake
  1 sibling, 0 replies; 11+ messages in thread
From: Martin Krischik @ 2005-04-23 19:59 UTC (permalink / raw)


Steve wrote:

> It would be nice to have a good explanation of each routine of each unit
> in the standard library described in Annex A.

Yes indeed.

> I use the information that is in the RM as much as I can, but often find
> that questions go unanswered.  Often resulting in writing small test
> programs or looking at GNAT source files to try to figure out what a
> routine does or how to use it.

The difference between a reference manual and a tutorial. That's what the
wiki pages have been started for. 

> It seems like the Wiki would be an ideal place to elaborate on each of the
> functions/procedures and their use.

We are working on it. But there is so much Ada to describe and so little
time to do it. Help is allways welcome.

> Any chance the RM could be converted to Wiki form so that explanations
> could be added where needed?

Currently we just link to the RM in our descriptions. 

Martin

-- 
mailto://krischik@users.sourceforge.net
Ada programming at: http://ada.krischik.com




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: span string.
  2005-04-23 15:43       ` Steve
  2005-04-23 19:59         ` Martin Krischik
@ 2005-04-24 13:01         ` Stephen Leake
  1 sibling, 0 replies; 11+ messages in thread
From: Stephen Leake @ 2005-04-24 13:01 UTC (permalink / raw)
  To: Steve; +Cc: comp.lang.ada

"Steve" <nospam_steved94@comcast.net> writes:

> Any chance the RM could be converted to Wiki form so that explanations could 
> be added where needed?

There is Ada code that generates the actual RM in various formats from
a Scheme-like markup language. I added a package that outputs TeXInfo
source. It wasn't hard; a few weekend's work.

There is already a module that outputs HTML. I assume Wiki format is
based on HTML.

So yes, it would be quite feasible to write an Ada package for the RM
generator that outputs an initial Wiki.

I'm not interested in actually doing that, but I'd be glad to help
someone get started.

It would be best to wait until the Ada 2006 RM is released; then we'll
have a stable Scheme and Ada code base to work from. That should be
later this year or early next year. However, if someone is inspired
now, I can give you the Ada 95 RM sources.

-- 
-- Stephe




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: span string.
  2005-04-22 20:31   ` Doker
  2005-04-22 23:45     ` Marius Amado Alves
  2005-04-23  6:39     ` Martin Krischik
@ 2005-04-25 14:02     ` Peter Hermann
  2 siblings, 0 replies; 11+ messages in thread
From: Peter Hermann @ 2005-04-25 14:02 UTC (permalink / raw)


Doker <doker0@wp.pl> wrote:
> ... a list of all standard packages with 
> all procedures and functions listed - with 3 words of explenation? 

http://www.csv.ica.uni-stuttgart.de/homes/ph/dva/adastandardcalls.txt

-- 
--Peter Hermann(49)0711-685-3611 fax3758 ica2ph@csv.ica.uni-stuttgart.de
--Pfaffenwaldring 27 Raum 114, D-70569 Stuttgart Uni Computeranwendungen
--http://www.csv.ica.uni-stuttgart.de/homes/ph/
--Team Ada: "C'mon people let the world begin" (Paul McCartney)



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2005-04-25 14:02 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-22 17:18 span string Doker
2005-04-22 18:44 ` Marc A. Criley
2005-04-22 20:31   ` Doker
2005-04-22 23:45     ` Marius Amado Alves
2005-04-23  6:39     ` Martin Krischik
2005-04-23 15:43       ` Steve
2005-04-23 19:59         ` Martin Krischik
2005-04-24 13:01         ` Stephen Leake
2005-04-25 14:02     ` Peter Hermann
2005-04-23  4:10 ` Jeffrey Carter
2005-04-23 14:14 ` Doker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox