473,406 Members | 2,343 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Gosub

SOR
I know I could use a function to get the same effect - but does php have
any type of gosub commands .
Jul 24 '05 #1
20 3489


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

Jul 24 '05 #2
SOR
<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 .
Jul 24 '05 #3
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
Jul 24 '05 #4


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

Jul 25 '05 #5
SOR
<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 .
Jul 25 '05 #6


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

Jul 25 '05 #7
SOR
<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 .
Jul 25 '05 #8
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
Jul 25 '05 #9
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/
Jul 25 '05 #10
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
Jul 25 '05 #11

"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
Jul 25 '05 #12
JDS
On Mon, 25 Jul 2005 04:07:54 +0100, SOR wrote:
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.

--
JDS | je*****@example.invalid
| http://www.newtnotes.com
DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/

Jul 25 '05 #13
SOR
<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 :-)
Jul 25 '05 #14

"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
Jul 25 '05 #15
SOR
<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 .
Jul 25 '05 #16
JDS
On Mon, 25 Jul 2005 20:56:51 +0100, SOR wrote:
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.

--
JDS | je*****@example.invalid
| http://www.newtnotes.com
DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/

Jul 26 '05 #17
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/
Jul 26 '05 #18
JDS
On Tue, 26 Jul 2005 16:04:32 +0100, Geoff Berrow wrote:
That's "asshole", thanks. This is the United States.


It is? Bloody hell, nobody told me.


Heh. I crack myself up

--
JDS | je*****@example.invalid
| http://www.newtnotes.com
DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/

Jul 26 '05 #19
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/
Jul 26 '05 #20
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

Jul 27 '05 #21

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

51
by: WindAndWaves | last post by:
Can anyone tell me what is wrong with the goto command. I noticed it is one of those NEVER USE. I can understand that it may lead to confusing code, but I often use it like this: is this...
8
by: doomx | last post by:
I'm using SQL scripts to create and alter tables in my DB I want to know if it's possible to fill the description(like in the Create table UI) using these scripts. EX: CREATE TABLE(...
6
by: Patrick Sullivan | last post by:
I want to use this algorithm but can't figure it out, I never used BASIC. I tried translating it but got lost in the gosubs and "for i - 1 to ... nexts". I have figured out that FNU(X) is degree...
62
by: zacks | last post by:
A co-worker where I work is proposing all future code devopment be done in Visual C#. Here is his assessment of VB: VB.NET is hack as far as the CLR(Common Language Runtime) goes. It was...
20
by: JL | last post by:
I have a need to compute least cost formulations. This seems to be in the domain of "linear programming" of which I know practially nothing. Can anyone in the group give me a point in the right...
0
by: pdorn | last post by:
Hi: I have been trying to create an eight deck card "shoe" (as used in casino games such as Blackjack and Baccarat), but have run into some problems. I do not have much programming experience, and so...
1
by: BobRuedy | last post by:
There is one main module & one monule for a subroutine (to get started). What does one do to make them work? Here they are: COMMON A, C A = 20 GOSUB "EX_2.BAS" ' The second Module END ...
20
by: Victor Smootbank | last post by:
I did program in BASIC for more than 20 years and for me it's still the ultimate programming language. Unfortunately, I was forced to upgrade to C++ and now I'm confused. While programming in...
14
by: Jamenson | last post by:
Hi everyone! I want to convert strings like "LEONARDO DI CAPRIO" to "Leonardo di Caprio". The function StrConv converts to "Leonardo Di Caprio" and we think it is innapropriated. Any help...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.