On Saturday, 8 July 2023 at 20:01:08 UTC, H. S. Teoh wrote:
On Sat, Jul 08, 2023 at 05:15:26PM +, Cecil Ward via
Digitalmars-d-learn wrote:
I have a dynamic array of dstrings and I’m spending dstrings
to it. At one point I need to append a zero-length string just
to increase the length of t
On Sat, Jul 08, 2023 at 05:15:26PM +, Cecil Ward via Digitalmars-d-learn
wrote:
> I have a dynamic array of dstrings and I’m spending dstrings to it. At
> one point I need to append a zero-length string just to increase the
> length of the array by one but I can’t have a slot containing garbag
On Saturday, 8 July 2023 at 17:15:26 UTC, Cecil Ward wrote:
I have a dynamic array of dstrings and I’m spending dstrings to
it. At one point I need to append a zero-length string just to
increase the length of the array by one but I can’t have a slot
containing garbage. I thought about ++arr.le
On Saturday, 8 July 2023 at 17:15:26 UTC, Cecil Ward wrote:
I have a dynamic array of dstrings and I’m spending dstrings to
it. At one point I need to append a zero-length string just to
increase the length of the array by one but I can’t have a slot
containing garbage. I thought about ++arr.le
On Tue, 30 Dec 2008 10:56:08 -0500, Michael P.
wrote:
>Jarrett Billingsley Wrote:
>
>> On Mon, Dec 29, 2008 at 10:36 PM, Michael P. wrote:
>> > import std.stdio;
>> > import std.cstream;
>> > void main()
>> > {
>> > char[][] names;
>> > char[] currentName;
>> > while( true )
>> > {
>> >d
>Well, let's go through the code.
>
> First of all, you should undestand that an array is nothing but a pair of
> pointer to first element and its length.
>
> Since char[] == string in D1, let's use string instead to make code slightly
> more readable.
>
> string[] names; // array of strings t
On Tue, 30 Dec 2008 20:34:00 +0300, Michael P. wrote:
Denis Koroskin Wrote:
On Tue, 30 Dec 2008 20:23:07 +0300, Michael P.
wrote:
> Denis Koroskin Wrote:
>
>> On Tue, 30 Dec 2008 18:56:08 +0300, Michael P.
>> wrote:
>>
>> > Jarrett Billingsley Wrote:
>> >
>> >> On Mon, Dec 29, 2008 at
Denis Koroskin Wrote:
> On Tue, 30 Dec 2008 20:23:07 +0300, Michael P. wrote:
>
> > Denis Koroskin Wrote:
> >
> >> On Tue, 30 Dec 2008 18:56:08 +0300, Michael P.
> >> wrote:
> >>
> >> > Jarrett Billingsley Wrote:
> >> >
> >> >> On Mon, Dec 29, 2008 at 10:36 PM, Michael P.
> >> >> wrote:
> >>
On Tue, 30 Dec 2008 20:23:07 +0300, Michael P. wrote:
Denis Koroskin Wrote:
On Tue, 30 Dec 2008 18:56:08 +0300, Michael P.
wrote:
> Jarrett Billingsley Wrote:
>
>> On Mon, Dec 29, 2008 at 10:36 PM, Michael P.
>> wrote:
>> > import std.stdio;
>> > import std.cstream;
>> > void main()
>> >
Denis Koroskin Wrote:
> On Tue, 30 Dec 2008 18:56:08 +0300, Michael P. wrote:
>
> > Jarrett Billingsley Wrote:
> >
> >> On Mon, Dec 29, 2008 at 10:36 PM, Michael P.
> >> wrote:
> >> > import std.stdio;
> >> > import std.cstream;
> >> > void main()
> >> > {
> >> > char[][] names;
> >> > char
On Tue, 30 Dec 2008 18:56:08 +0300, Michael P. wrote:
Jarrett Billingsley Wrote:
On Mon, Dec 29, 2008 at 10:36 PM, Michael P.
wrote:
> import std.stdio;
> import std.cstream;
> void main()
> {
> char[][] names;
> char[] currentName;
> while( true )
> {
>din.readf( "%s", ¤tName );
>
Jarrett Billingsley Wrote:
> On Mon, Dec 29, 2008 at 10:36 PM, Michael P. wrote:
> > import std.stdio;
> > import std.cstream;
> > void main()
> > {
> > char[][] names;
> > char[] currentName;
> > while( true )
> > {
> >din.readf( "%s", ¤tName );
> >if( currentName == "stop" )
> >
On Tue, 30 Dec 2008 17:00:10 +1300, Jarrett Billingsley
wrote:
On Mon, Dec 29, 2008 at 10:53 PM, Tim M wrote:
Where is din.readf? If it is a c function then it won't be able to set
up
the dynamic array.
In std.cstream, din is an instance of std.stream.Stream bound to
standard in.
On Mon, Dec 29, 2008 at 10:53 PM, Tim M wrote:
>
> Where is din.readf? If it is a c function then it won't be able to set up
> the dynamic array.
In std.cstream, din is an instance of std.stream.Stream bound to standard in.
On Tue, 30 Dec 2008 16:36:24 +1300, Michael P.
wrote:
import std.stdio;
import std.cstream;
void main()
{
char[][] names;
char[] currentName;
while( true )
{
din.readf( "%s", ¤tName );
if( currentName == "stop" )
{
break;
}
else
{
//what goes here t
On Mon, Dec 29, 2008 at 10:36 PM, Michael P. wrote:
> import std.stdio;
> import std.cstream;
> void main()
> {
> char[][] names;
> char[] currentName;
> while( true )
> {
>din.readf( "%s", ¤tName );
>if( currentName == "stop" )
>{
> break;
>}
>else
>{
names ~= cur
16 matches
Mail list logo