SPUG: one of those 'other' programming languages
Ryan Forsythe
ryan at webrocket.net
Mon Jan 24 23:49:51 CST 2000
> Maybe it'll help if you floated that piece of code you're working on, so
we
> can have a few 'extra pairs of eyes' look at it and give some suggestions
on
> how to write an effective code.
i would, but it's a bit of a mess...and it's c. pretty much what i wanted to
do was make a translation method for this object we had to make. i wanted
it to take in something like '3x^5 + 2x^2 + 4' and spit the coefficient and
the power out into an array. it would be incredibly simple if c had
regexes. but it doesn't, so i had to write this load of 'walk through the
char array until you find 'x', then walk backward until you hit a space,
sticking each char into a buffer array, reverse that array, tack on a /0,
convert it to an int, stick it in the polynomial array then go back to the x
and blah blah blah.'
it ballooned, and it wasn't very well written. if anyone's still interested
in looking at it, i've got the code here:
www.flamingweasel.com/c.html
and sorry about the formatting...tabs always turn a little screwy across
different programs
--ryan
----- Original Message -----
From: "Jafaar Nyang'oro" <seppy at mail.tanzatech.com>
To: "Ryan Forsythe" <twitch at webrocket.net>; <spug-list at pm.org>
Sent: Monday, January 24, 2000 9:17 PM
Subject: Re: SPUG: one of those 'other' programming languages
> ryan,
>
> The answer is 'yes'. You can embed Perl in other languanges. And have done
> it a couple of times myself. And 'yes' I think it's useful enough and
> produces a cleaner code (depending on what you want to achieve with your
> code).
>
> Maybe it'll help if you floated that piece of code you're working on, so
we
> can have a few 'extra pairs of eyes' look at it and give some suggestions
on
> how to write an effective code.
>
> ../seppy
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe
Email to majordomo at pm.org: ACTION spug-list your_address
More information about the spug-list
mailing list