Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

RE : iterate over the fields of a struct?

> -----Message d'origine-----
> De=A0: Randy W. Sims [mailto:randys@thepierianspring.org]
> Envoy=E9=A0: samedi 7 ao=FBt 2004 02:50
> =C0=A0: cjbottaro@alumni.cs.utexas.edu
> Cc=A0: beginners@perl.org
> Objet=A0: Re: iterate over the fields of a struct?
>=20
> Christopher J. Bottaro wrote: 
> order 
>=20
> No. You could store the data used to generate the struct, and then use
> it later.
>=20
> my @struct_data =3D [
>    key1 =3D> 'type',
>    key2 =3D> 'type',
> ];
>=20
> struct Name =3D> \@struct_data;
>=20
> then iterate of @struct_data...
>=20

did you meant:

my $struct_data =3D [ #array_ref
key1 =3D> 'type',
key2 =3D> 'type',
];

struct Name =3D> $struct_data;
then iterate of @$struct_data ...

?

array =3D array_ref is confusing to me ...
could you explain please ?
 
that
> i 
order,
> unless 
i.e. 
>=20
> If you're using version 5.8 or later you can use restricted hashes.
See
> `perldoc Hash::Util`
>=20

helpfull module !
Hash vivification is a nightmare, really ...

Jos=E9.


Report this thread to moderator Post Follow-up to this message
Old Post
Jose Nyimi
08-07-04 01:55 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PERL Beginners archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 04:39 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.