%w

  • Thread starter Eustaquio Rangel de Oliveira Jr.
  • Start date
E

Eustaquio Rangel de Oliveira Jr.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hey, what %w exactly is (I mean, I know it's the string array creator par=
t)?
A method? From what object?

Thanks!

- --
- ----------------------------
Eust=E1quio "TaQ" Rangel
(e-mail address removed)
http://beam.to/taq
Usu=E1rio GNU/Linux no. 224050
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.7 (GNU/Linux)

iD8DBQFDMc2+b6UiZnhJiLsRAj9SAJ9eO7x4Pnw2ceApWLKZII2cNEuxaQCeLbeI
cfhpQR0dCo8LHiAkFlcdqek=3D
=3DOUVs
-----END PGP SIGNATURE-----
 
L

Logan Capaldo

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hey, what %w exactly is (I mean, I know it's the string array =20
creator part)?
A method? =46rom what object?

Thanks!

- --
- ----------------------------
Eust=E1quio "TaQ" Rangel
(e-mail address removed)
http://beam.to/taq
Usu=E1rio GNU/Linux no. 224050
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.7 (GNU/Linux)

iD8DBQFDMc2+b6UiZnhJiLsRAj9SAJ9eO7x4Pnw2ceApWLKZII2cNEuxaQCeLbeI
cfhpQR0dCo8LHiAkFlcdqek=3D
=3DOUVs
-----END PGP SIGNATURE-----

Its syntax (of the sugary variety).

Just think about as being in the same category as x =3D [ 1,2,3 ]

The [ and ,'s in this case aren't methods of anything persay, tis =20
just the syntax for an array literal. %w is an alternate array =20
literal syntax, it just does a bit more.
 
L

Lars Francke

Hi,
Its syntax (of the sugary variety).

and if you really want to see how it is implemented have a look at the
function yylex() in the file parse.c.

You'll find something like:

case 'w':
lex_strterm = NEW_STRTERM(str_squote | STR_FUNC_QWORDS, term, paren);
do {c = nextc();} while (ISSPACE(c));
pushback(c);
return tQWORDS_BEG;

But I believe you were looking for Logans answer :)

Lars
 
E

Eustaquio Rangel de Oliveira J

Hi!
and if you really want to see how it is implemented
have a look at the=20
function yylex() in the file parse.c.
But I believe you were looking for Logans answer :)

To be honest, for both answers. :)
Thanks Lars and Logan.=20
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,710
Latest member
bernietqt

Latest Threads

Top