I know I could use a function to get the same effect - but does php have
any type of gosub commands . 20 3528
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.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 .
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.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 .
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.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 .
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.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/ This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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
|
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',
|
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" experience who can unravel this for
fun? :)
1740 DEF FN Y(X) = ATN(SQR(1 - X * X) / X):Y = 0:MO = 360...
|
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 (features) were forced into the language through very ugly
means to make it easier for the VB guys to...
|
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
| |
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 is reached or exceeded, the program attempts to reshuffle all cards. The problem is duplicate cards...
|
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
|
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++???
|
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!
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |