473,406 Members | 2,217 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.

Optional By Ref Argument?

Is it possible to make a by-reference argument optional in a UDF? When I
try to assign it a default value in the definition, I get a parse error,
"unexpected '='". PHP itself has optional by-ref arguments (e.g. getmxrr);
is it not possible for UDFs?

--
Alan Little
Phorm PHP Form Processor
http://www.phorm.com/
Jul 17 '05 #1
2 2507
Alan Little wrote:
Is it possible to make a by-reference argument optional in a UDF? When I
try to assign it a default value in the definition, I get a parse error,
"unexpected '='". PHP itself has optional by-ref arguments (e.g. getmxrr);
is it not possible for UDFs?


It's possible with PHP 5, impossible (as far as I know) with PHP 4
Some time ago there was a discussion here about that:
http://groups.google.com/groups?thre...ing.google.com

--
Mail sent to my "From:" address is publicly readable at http://www.dodgeit.com/
== ** ## !! !! ## ** ==
TEXT-ONLY mail to the complete "Reply-To:" address ("My Name" <my@address>) may
bypass the spam filter. I will answer all pertinent mails from a valid address.
Jul 17 '05 #2
Carved in mystic runes upon the very living rock, the last words of
Pedro Graca of comp.lang.php make plain:
Alan Little wrote:
Is it possible to make a by-reference argument optional in a UDF?


It's possible with PHP 5, impossible (as far as I know) with PHP 4
Some time ago there was a discussion here about that:
http://groups.google.com/groups?thre...030819.1bb543b
2%40posting.google.com


OK, thanks.

--
Alan Little
Phorm PHP Form Processor
http://www.phorm.com/
Jul 17 '05 #3

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

Similar topics

0
by: Philip Rittenhouse | last post by:
I have discovered a couple of problems with the way the universal gateway code handles optional parameters and variable argument lists in COM servers. It appears to only be a problem when you...
2
by: Exyle | last post by:
I have a function that has two arguents, however depending on the value of the first argument, the second one may or may not be needed. If I only input the first argument when calling the function,...
4
by: Gerry Abbott | last post by:
Hi All, Im trying to use thie combination but have not had success. Below is the function It tried the following myriskLevel(2,2) myrisklevel(0,0,2) and the ismissing(Three) alwasy...
9
by: tiger79 | last post by:
Hi, I would like to know if there exists something like the Optional argument in VB for C# ??? thanx...
16
by: ad | last post by:
Does C#2.0 support optional parameters like VB.NET: Function MyFunction(Optional ByVal isCenter As Boolean = False)
1
by: Doug Zody | last post by:
How to make function argument as optional in Vb.Net? I have a function signature as shown below. I am using .Net Framework 1.1. Public Shared Function Foo(ByVal strCustNo As String, ByRef...
3
by: Marco Segurini | last post by:
Hi, Actually I am calling from VB some functions imported from a c++ dll. Some of these functions require as parameter a pointer. Example: extern "C" int DllCall(int * pvInt, int iLen); ...
4
by: Joe HM | last post by:
Hello - I realize that there is no more IsMissing function in VB.NET but how can I have a boolean argument that is optional and in the code I need to determine whether it was passed it or not? ...
6
by: Rob Hoelz | last post by:
So these two functions are different: void foo(void); and void foo(); because the first one allows no arguments, but the second does. My question is: In the implementation of the...
7
by: jamesclose | last post by:
My problem is this (apologies if this is a little long ... hang in there): I can define a function in VB.NET with optional parameters that wraps a SQL procedure: Sub Test(Optional ByVal Arg1...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
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...
0
agi2029
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,...
0
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...

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.