473,554 Members | 2,841 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3511


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.ph p , Ken Robinson , ke******@rbnsn. com>
<11************ **********@g49g 2000cwa.googleg roups.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.ph p , Ken Robinson , ke******@rbnsn. com>
<11************ **********@g49g 2000cwa.googleg roups.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.ph p , Ken Robinson , ke******@rbnsn. com>
<11************ **********@z14g 2000cwz.googleg roups.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.newsread er.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

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

Similar topics

51
13321
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 wrong????? Function x select case z
8
3977
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( Pk_myPrimaryKey INTEGER CONSTRAINT pk PRIMARY KEY DESCRIPTION 'This is the primary key of the table',
6
1352
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 to radians, and FNY is a modulo, but those are not what get me confused, it's just this section here. Anyone in here with "old school BASIC"...
62
5132
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 retrofited into the .Net framework for those people who simply don't, and do not care to, understand object oriented programming. Quite a few of it's...
20
2926
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 direction...are there any tools/libraries, books, websites, etc. TIA, John
0
1304
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 I tried the following rather inefficient code using multi-dimensional arrays. Each hand in baccarat contains between 4 and 6 cards, so if 410 cards...
1
1348
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 'Second Mod. C = A * 2 RETURN
20
6641
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 BASIC, my favourites were GOTOs and sometimes GOSUBs and spaghetti code was my trademark. How can I write spaghetti code in C++???
14
2522
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 appreciated. Thank you!
0
7600
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7802
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7563
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7889
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5436
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5155
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3560
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2020
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
841
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.