I know I could use a function to get the same effect - but does php have
any type of gosub commands . 20 3342
SOR wrote: I know I could use a function to get the same effect - but does php have any type of gosub commands .
No. Function are subroutines. If you don't want to return anything,
don't.
Stop thinking in BASIC.
Ken
<comp.lang.php , Ken Robinson , ke******@rbnsn.com>
<11**********************@g49g2000cwa.googlegroups .com>
<24 Jul 2005 10:13:43 -0700> I know I could use a function to get the same effect - but does php have any type of gosub commands .
No. Function are subroutines. If you don't want to return anything, don't.
Stop thinking in BASIC.
I dont recall asking you what I should or shouldnt think .
SOR wrote: Stop thinking in BASIC.
I dont recall asking you what I should or shouldnt think .
I think that the antithesis felt toward BASIC is just the way gosub and goto
fight against writing a structured program.
Of course you could use the arithmetic IF statements of FORTRAN 66 or that
fact that you can have multiple entry and exit points allowed for functions
and subroutines in FORTRAN to take some of the heat off of BASIC!
Pete
-- http://www.petezilla.co.uk
SOR wrote: Stop thinking in BASIC.
I dont recall asking you what I should or shouldnt think .
Sorry, what I meant by that statment is that since you're trying to
learn a new language, don't try to write code the way you did in
another language. Since you mentioned gosub, I assumed you know BASIC
and that's how you're trying to program. You can use the concepts from
other languages, but learn to use the powers of whatever language you
use.
I remember seeing someone who created enough macros in C so he could
make his C code look like Fortran. It may have been a good execise for
the mind, but it's not good for production coding.
Ken
<comp.lang.php , Ken Robinson , ke******@rbnsn.com>
<11**********************@g49g2000cwa.googlegroups .com>
<24 Jul 2005 17:57:12 -0700> Stop thinking in BASIC.
I dont recall asking you what I should or shouldnt think .
Sorry, what I meant by that statment is that since you're trying to learn a new language, don't try to write code the way you did in another language. Since you mentioned gosub, I assumed you know BASIC and that's how you're trying to program.
I know several variants of basic - I asked a question if there was any
alternative ways to do it using php and thats all that type of question
is .
BTW: does anybody on here ever ask for a site critique after they finish
writing a script ? .
It seems a bit curious that a newsgroup full of php geeks and would be
php geeks dont really give details of any new stuff they do , Although
in part I suppose thats because some users on here only really write or
do stuff for other people and NDA could apply or whatever .
SOR wrote (in part): BTW: does anybody on here ever ask for a site critique after they finish writing a script ? .
It seems a bit curious that a newsgroup full of php geeks and would be php geeks dont really give details of any new stuff they do , Although in part I suppose thats because some users on here only really write or do stuff for other people and NDA could apply or whatever .
I've seen some requests for critiques here. The biggest problems is
that, unless you post the code, there's no way to critique the original
PHP code, we can only critique the final results.
Another site that has a good PHP forum is <http://www.tek-tips.com/>.
Ken
<comp.lang.php , Ken Robinson , ke******@rbnsn.com>
<11**********************@z14g2000cwz.googlegroups .com>
<24 Jul 2005 19:45:51 -0700> BTW: does anybody on here ever ask for a site critique after they finish writing a script ? .
It seems a bit curious that a newsgroup full of php geeks and would be php geeks dont really give details of any new stuff they do , Although in part I suppose thats because some users on here only really write or do stuff for other people and NDA could apply or whatever . I've seen some requests for critiques here. The biggest problems is that, unless you post the code, there's no way to critique the original PHP code, we can only critique the final results.
Then flex your fingers and wet your lips old chap as this newbie will be
asking in a couple of days and i'm quite looking forward to seeing my
code ripped to pieces and thrashed to within a inch of its life :-)
Another site that has a good PHP forum is <http://www.tek-tips.com/>.
Thanks for that .
On Sun, 24 Jul 2005 22:29:37 +0100, Peter Chant wrote: SOR wrote:
Stop thinking in BASIC.
I dont recall asking you what I should or shouldnt think .
I think that the antithesis felt toward BASIC is just the way gosub and goto fight against writing a structured program.
Of course you could use the arithmetic IF statements of FORTRAN 66 or that fact that you can have multiple entry and exit points allowed for functions and subroutines in FORTRAN to take some of the heat off of BASIC!
Pete
Well, I know Fortran 2, 4 and 77 ( with blocked if statements at last! ),
but not 66.
Steve
I noticed that Message-ID:
<MP************************@no-cancel.newsreader.com> from SOR contained
the following: Then flex your fingers and wet your lips old chap as this newbie will be asking in a couple of days and i'm quite looking forward to seeing my code ripped to pieces and thrashed to within a inch of its life :-)
You tend to get a good response if it captures the imagination. I got
quite a good response with my bingo problem. If you just want people to
help you clean up your code I suspect the response may not be all you
hope for.
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Steve wrote: Well, I know Fortran 2, 4 and 77 ( with blocked if statements at last! ), but not 66.
I think 66 may be another name for IV. I've not used it, I learnt 77, but
it is mentioned in one of my reference books.
Pete
-- http://www.petezilla.co.uk
"Peter Chant" <pe**@petezilla.co.uk> wrote in message
news:3k************@individual.net... Steve wrote:
Well, I know Fortran 2, 4 and 77 ( with blocked if statements at last! ), but not 66.
I think 66 may be another name for IV. I've not used it, I learnt 77, but it is mentioned in one of my reference books.
Wow! There are people out there almost as old as me. I learned programming
on the job with Fortran 4. Take that stack of punched cards and submit it
in the morning. Hopefully you get it back by the end of the day just in
time to make the corrections and submit it overnight for the next morning to
fix early and repeat again. We had TWO IBM 7094s hooked together for an
amazing 64K memory!
There were no blocked ifs so you HAD to write spaghetti code. After the
intro of Fortran 77, with the exception of (ugh!) Basic, I think I wrote a
grand total of 5 gotos over the next almost three decades.
Shelly
<comp.lang.php , JDS , je*****@example.invalid>
<pa****************************@example.invalid>
<Mon, 25 Jul 2005 14:11:31 -0400> Then flex your fingers and wet your lips old chap as this newbie will be asking in a couple of days and i'm quite looking forward to seeing my code ripped to pieces and thrashed to within a inch of its life :-)
Then you may want to drop a bit of the defensive over-sensitivity.
Perhaps your right and I should do as you did and seek out my feminine
side :-)
"SOR" <we*******@sparesorrepair.co.uk.INVALID> wrote in message
news:MP************************@no-cancel.newsreader.com... <comp.lang.php , JDS , je*****@example.invalid> <pa****************************@example.invalid> <Mon, 25 Jul 2005 14:11:31 -0400>
> Then flex your fingers and wet your lips old chap as this newbie will > be > asking in a couple of days and i'm quite looking forward to seeing my > code ripped to pieces and thrashed to within a inch of its life :-)
Then you may want to drop a bit of the defensive over-sensitivity.
Perhaps your right and I should do as you did and seek out my feminine side :-)
With an attitude like that, and with comments like that (even with a
smiley), you'll be lucky to get help anywhere. You are, after all, the one
seeking help.
Shelly
<comp.lang.php , Shelly , sh************@asap-consult.com>
<xa******************@twister.nyroc.rr.com>
<Mon, 25 Jul 2005 19:35:57 GMT> Then you may want to drop a bit of the defensive over-sensitivity.
Perhaps your right and I should do as you did and seek out my feminine side :-)
With an attitude like that,
Is there a clp faq that will tell me what attitude I should adopt ? .
and with comments like that (even with a smiley), you'll be lucky to get help anywhere. You are, after all, the one seeking help.
Correct & i'd rather do without than grovel to some childish arsehole
who takes words displayed on a computer monitor a bit too seriously .
I noticed that Message-ID:
<pa****************************@example.invalid> from JDS contained the
following: Correct & i'd rather do without than grovel to some childish arsehole who takes words displayed on a computer monitor a bit too seriously .
That's "asshole", thanks. This is the United States.
It is? Bloody hell, nobody told me.
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
In article <v6********************************@4ax.com>,
Geoff Berrow <bl******@ckdog.co.uk> wrote: I noticed that Message-ID: <pa****************************@example.invalid> from JDS contained the following:
Correct & i'd rather do without than grovel to some childish arsehole who takes words displayed on a computer monitor a bit too seriously .
That's "asshole", thanks. This is the United States.
It is? Bloody hell, nobody told me.
The proper spelling is Jeff too. >:) j/k!
--
Available for Hire! http://amduus.com/Resumes/
SOR wrote: I know I could use a function to get the same effect - but does php have any type of gosub commands .
Your question is not clear to me. I suppose, you're looking for
something like <http://in2.php.net/apd> ??
--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com This discussion thread is closed Replies have been disabled for this discussion. Similar topics
51 posts
views
Thread by WindAndWaves |
last post: by
|
8 posts
views
Thread by doomx |
last post: by
|
6 posts
views
Thread by Patrick Sullivan |
last post: by
|
62 posts
views
Thread by zacks |
last post: by
|
20 posts
views
Thread by JL |
last post: by
| | |
20 posts
views
Thread by Victor Smootbank |
last post: by
|
14 posts
views
Thread by Jamenson |
last post: by
| | | | | | | | | | |