473,386 Members | 1,943 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,386 software developers and data experts.

Functions: Passing multiple values

Hello:

I want a function to return three variables to the calling procedure:

Private Function CalcTimes(ByVal iAddDays as Integer, ByVal iAddHours as
Integer, ByVal iAddMins as Integer) As Array

Variable values are calculated in the function.

Calling procedure receives the values preferably into variables of the same
name.

Like: Me.CalcTimes(iAddDays, iAddHours, iAddMins)

Further use is ...(New TimeSpan(iAddDays, iAddHours, iAddMins, 0))

Could use ParamArray Arguments?

Is As Array correct or should it be As Integer?
Do I need to declare CalcTimes as an array before it is used, or is it an
array by definition?

This is somewhat confusing to me.
Balena's Prog-Vb ParamArray example begins:
Function Sum(ParamArray ByVal args() As Integer) As Integer
Dim index As Integer
For index = 0 to UBound(args)....

So far, I'm getting a debug error. I tried a return statement:
Return CalcTimes(iAddDays, iAddHours, iAddMins)
I'm not even sure about using a return statement here. It immediately
preceeds the End Function statement anyway.
Sorry about being lazy. 5:36AM is near end of the day for me.
Thanks.

D.

--
http://www.dennisys.com/
Nov 21 '05 #1
12 6859
Make it easy on yoursefl

Public Sub myFunction (byRef iAddDays as Integer, byRef iAddHours as
Integer, byRef iAddMins as integer)

Useing Ref will pass by reference, (just passing the "pointer" in) and
allow you to modify the variables and pass all 3 back.

I have no idea what ParamArray ByVal Params() as Integer will do... never
seen ParamArray before.

-CJ
"Dennis D." <te**@dennisys.com> wrote in message
news:ub**************@tk2msftngp13.phx.gbl...
Hello:

I want a function to return three variables to the calling procedure:

Private Function CalcTimes(ByVal iAddDays as Integer, ByVal iAddHours as
Integer, ByVal iAddMins as Integer) As Array

Variable values are calculated in the function.

Calling procedure receives the values preferably into variables of the same name.

Like: Me.CalcTimes(iAddDays, iAddHours, iAddMins)

Further use is ...(New TimeSpan(iAddDays, iAddHours, iAddMins, 0))

Could use ParamArray Arguments?

Is As Array correct or should it be As Integer?
Do I need to declare CalcTimes as an array before it is used, or is it an
array by definition?

This is somewhat confusing to me.
Balena's Prog-Vb ParamArray example begins:
Function Sum(ParamArray ByVal args() As Integer) As Integer
Dim index As Integer
For index = 0 to UBound(args)....

So far, I'm getting a debug error. I tried a return statement:
Return CalcTimes(iAddDays, iAddHours, iAddMins)
I'm not even sure about using a return statement here. It immediately
preceeds the End Function statement anyway.
Sorry about being lazy. 5:36AM is near end of the day for me.
Thanks.

D.

--
http://www.dennisys.com/

Nov 21 '05 #2
Hi,
An easy way to get multiple return values from a function is to use ByRef
parameters. For example:

Sub CalcTimes (ByRef i As Integer, ByRef j As Integer, ByRef k As Integer)
i = 40
j = 49
k = 39
End Sub

Dim a, b, c As Integer
CalcTimes (a, b, c)

After the call, a, b & c will all have the values set by CalcTimes.

I hope this is what you are looking for.

"Dennis D." <te**@dennisys.com> wrote in message
news:ub**************@tk2msftngp13.phx.gbl...
Hello:

I want a function to return three variables to the calling procedure:

Private Function CalcTimes(ByVal iAddDays as Integer, ByVal iAddHours as
Integer, ByVal iAddMins as Integer) As Array

Variable values are calculated in the function.

Calling procedure receives the values preferably into variables of the same
name.

Like: Me.CalcTimes(iAddDays, iAddHours, iAddMins)

Further use is ...(New TimeSpan(iAddDays, iAddHours, iAddMins, 0))

Could use ParamArray Arguments?

Is As Array correct or should it be As Integer?
Do I need to declare CalcTimes as an array before it is used, or is it an
array by definition?

This is somewhat confusing to me.
Balena's Prog-Vb ParamArray example begins:
Function Sum(ParamArray ByVal args() As Integer) As Integer
Dim index As Integer
For index = 0 to UBound(args)....

So far, I'm getting a debug error. I tried a return statement:
Return CalcTimes(iAddDays, iAddHours, iAddMins)
I'm not even sure about using a return statement here. It immediately
preceeds the End Function statement anyway.
Sorry about being lazy. 5:36AM is near end of the day for me.
Thanks.

D.

--
http://www.dennisys.com/

Nov 21 '05 #3
If iAddDays, iAddHours and iAddmins are the values you are returning, you
can just pass them byref and the changes to these values will reflect ones
the procedure returns. In that case, you don't need to define it as
function - you could just define it as a sub.
If you are going to be using those 3 variables often - probably for a lot of
date-time calculations - you might want to define a structure with the 3
variables and then create a function that returns that structure.
something like:

private Structure DateTimeStruct
dim iAddDays as Integer
dim iAddHours as Integer
dim iAddMins as Integer
end structure

function CalcTimes( ) as DateTimeStruct

and then call it as:
dim myStruct as DateTimeStruct = Me.CalcTimes

just along those lines..

hope that helps..
Imran.

"Dennis D." <te**@dennisys.com> wrote in message
news:ub**************@tk2msftngp13.phx.gbl...
Hello:

I want a function to return three variables to the calling procedure:

Private Function CalcTimes(ByVal iAddDays as Integer, ByVal iAddHours as
Integer, ByVal iAddMins as Integer) As Array

Variable values are calculated in the function.

Calling procedure receives the values preferably into variables of the same name.

Like: Me.CalcTimes(iAddDays, iAddHours, iAddMins)

Further use is ...(New TimeSpan(iAddDays, iAddHours, iAddMins, 0))

Could use ParamArray Arguments?

Is As Array correct or should it be As Integer?
Do I need to declare CalcTimes as an array before it is used, or is it an
array by definition?

This is somewhat confusing to me.
Balena's Prog-Vb ParamArray example begins:
Function Sum(ParamArray ByVal args() As Integer) As Integer
Dim index As Integer
For index = 0 to UBound(args)....

So far, I'm getting a debug error. I tried a return statement:
Return CalcTimes(iAddDays, iAddHours, iAddMins)
I'm not even sure about using a return statement here. It immediately
preceeds the End Function statement anyway.
Sorry about being lazy. 5:36AM is near end of the day for me.
Thanks.

D.

--
http://www.dennisys.com/

Nov 21 '05 #4
Dennis,

First of all this text from this page
The Array class is the base class for language implementations that support
arrays. However, only the system and compilers can derive explicitly from
the Array class. Users should use the array constructs provided by the
language.

http://msdn.microsoft.com/library/de...ClassTopic.asp

And than you can try this sample I made from your question.

I hope this helps?

Cor

\\\
Private Sub Form1_Load(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Dim mydates As Date()
mydates = CalcTimes(Now.Day, Now.TimeOfDay.Hours, _
Now.TimeOfDay.Minutes)
MessageBox.Show(mydates(2).ToString)
End Sub
Private Function CalcTimes(ByVal iAddDays As _
Integer, ByVal iAddHours As Integer, _
ByVal iAddMins As Integer) As Date()
Dim mydate As New Date(2004, 8, iAddDays, _
iAddHours, iAddMins, 0)
Dim mydatetable(2) As Date
mydatetable(0) = mydate
mydate.AddDays(1)
mydatetable(1) = mydate
mydate.AddDays(1)
mydatetable(2) = mydate
Return mydatetable
End Function
///
Nov 21 '05 #5
CJ
I have no idea what ParamArray ByVal Params() as Integer will do... never
seen ParamArray before.
ParamArray allows you to pass a variable number of parameters. You use it
when you want to send a list of input parameters to the function, but you
don't know before hand how many items will be in that list. That explicitly
using an array for the call would be inconvenient, for example Console.Write
where you specify a Format string
http://msdn.microsoft.com/library/de...iteTopic14.asp
For details on ParamArray see:
http://msdn.microsoft.com/library/de...pec7_1_6_4.asp
For example:

Function Sum(ParamArray ByVal args() As Integer) As Integer
...
End Function
x = Sum(1)
x = Sum(1,2,3,4,5,6)
x = Sum(1,2,3)
x = Sum(6,7,8,9)

is Equivalent to:

Function Sum(ByVal args() As Integer) As Integer
...
End Function

x = Sum(New Integer() {1})
x = Sum(New Integer() {1,2,3,4,5,6})
x = Sum(New Integer() {1,2,3})
x = Sum(New Integer() {6,7,8,9})

The ParamArray allows you to skip the array initialization syntax. (cleaner
usage of Sum).

In fact ParamArray allows you to send either a variable number of parameters
or a single Array.

Hope this helps
Jay

"CJ Taylor" <[cege] at [tavayn] dit commmmm> wrote in message
news:OG**************@TK2MSFTNGP15.phx.gbl... Make it easy on yoursefl

Public Sub myFunction (byRef iAddDays as Integer, byRef iAddHours as
Integer, byRef iAddMins as integer)

Useing Ref will pass by reference, (just passing the "pointer" in) and
allow you to modify the variables and pass all 3 back.

I have no idea what ParamArray ByVal Params() as Integer will do... never
seen ParamArray before.

-CJ
"Dennis D." <te**@dennisys.com> wrote in message
news:ub**************@tk2msftngp13.phx.gbl...
Hello:

I want a function to return three variables to the calling procedure:

Private Function CalcTimes(ByVal iAddDays as Integer, ByVal iAddHours as
Integer, ByVal iAddMins as Integer) As Array

Variable values are calculated in the function.

Calling procedure receives the values preferably into variables of the

same
name.

Like: Me.CalcTimes(iAddDays, iAddHours, iAddMins)

Further use is ...(New TimeSpan(iAddDays, iAddHours, iAddMins, 0))

Could use ParamArray Arguments?

Is As Array correct or should it be As Integer?
Do I need to declare CalcTimes as an array before it is used, or is it an array by definition?

This is somewhat confusing to me.
Balena's Prog-Vb ParamArray example begins:
Function Sum(ParamArray ByVal args() As Integer) As Integer
Dim index As Integer
For index = 0 to UBound(args)....

So far, I'm getting a debug error. I tried a return statement:
Return CalcTimes(iAddDays, iAddHours, iAddMins)
I'm not even sure about using a return statement here. It immediately
preceeds the End Function statement anyway.
Sorry about being lazy. 5:36AM is near end of the day for me.
Thanks.

D.

--
http://www.dennisys.com/


Nov 21 '05 #6
Thanks a lot Jay. Never saw that before.

-CJ

"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
CJ
I have no idea what ParamArray ByVal Params() as Integer will do... never
seen ParamArray before.
ParamArray allows you to pass a variable number of parameters. You use it
when you want to send a list of input parameters to the function, but you
don't know before hand how many items will be in that list. That

explicitly using an array for the call would be inconvenient, for example Console.Write where you specify a Format string
http://msdn.microsoft.com/library/de...iteTopic14.asp

For details on ParamArray see:
http://msdn.microsoft.com/library/de...pec7_1_6_4.asp

For example:

Function Sum(ParamArray ByVal args() As Integer) As Integer
...
End Function
x = Sum(1)
x = Sum(1,2,3,4,5,6)
x = Sum(1,2,3)
x = Sum(6,7,8,9)

is Equivalent to:

Function Sum(ByVal args() As Integer) As Integer
...
End Function

x = Sum(New Integer() {1})
x = Sum(New Integer() {1,2,3,4,5,6})
x = Sum(New Integer() {1,2,3})
x = Sum(New Integer() {6,7,8,9})

The ParamArray allows you to skip the array initialization syntax. (cleaner usage of Sum).

In fact ParamArray allows you to send either a variable number of parameters or a single Array.

Hope this helps
Jay

"CJ Taylor" <[cege] at [tavayn] dit commmmm> wrote in message
news:OG**************@TK2MSFTNGP15.phx.gbl...
Make it easy on yoursefl

Public Sub myFunction (byRef iAddDays as Integer, byRef iAddHours as
Integer, byRef iAddMins as integer)

Useing Ref will pass by reference, (just passing the "pointer" in) and
allow you to modify the variables and pass all 3 back.

I have no idea what ParamArray ByVal Params() as Integer will do... never seen ParamArray before.

-CJ
"Dennis D." <te**@dennisys.com> wrote in message
news:ub**************@tk2msftngp13.phx.gbl...
Hello:

I want a function to return three variables to the calling procedure:

Private Function CalcTimes(ByVal iAddDays as Integer, ByVal iAddHours as Integer, ByVal iAddMins as Integer) As Array

Variable values are calculated in the function.

Calling procedure receives the values preferably into variables of the

same
name.

Like: Me.CalcTimes(iAddDays, iAddHours, iAddMins)

Further use is ...(New TimeSpan(iAddDays, iAddHours, iAddMins, 0))

Could use ParamArray Arguments?

Is As Array correct or should it be As Integer?
Do I need to declare CalcTimes as an array before it is used, or is it

an array by definition?

This is somewhat confusing to me.
Balena's Prog-Vb ParamArray example begins:
Function Sum(ParamArray ByVal args() As Integer) As Integer
Dim index As Integer
For index = 0 to UBound(args)....

So far, I'm getting a debug error. I tried a return statement:
Return CalcTimes(iAddDays, iAddHours, iAddMins)
I'm not even sure about using a return statement here. It immediately
preceeds the End Function statement anyway.
Sorry about being lazy. 5:36AM is near end of the day for me.
Thanks.

D.

--
http://www.dennisys.com/



Nov 21 '05 #7
Thanks Jay. That's a good description of ParamArray. The issue of sending an
unknown number of values to a function has been around for decades in
various languages. Here it is again. That's interesting. I had forgotten it.

Back a few decades the proper way to learn a language began with a white
paper. Do they exist for dot net, or would a person begin by studying the
compiler specs? Guess what I'm asking is: Where does it all start?

Thanks again Jay,

D.

"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
CJ
I have no idea what ParamArray ByVal Params() as Integer will do... never
seen ParamArray before.


ParamArray allows you to pass a variable number of parameters. You use it
when you want to send a list of input parameters to the function, but you
don't know before hand how many items will be in that list. That
explicitly
using an array for the call would be inconvenient, for example
Console.Write
where you specify a Format string
http://msdn.microsoft.com/library/de...iteTopic14.asp
For details on ParamArray see:
http://msdn.microsoft.com/library/de...pec7_1_6_4.asp
For example:

Function Sum(ParamArray ByVal args() As Integer) As Integer
...
End Function
x = Sum(1)
x = Sum(1,2,3,4,5,6)
x = Sum(1,2,3)
x = Sum(6,7,8,9)

is Equivalent to:

Function Sum(ByVal args() As Integer) As Integer
...
End Function

x = Sum(New Integer() {1})
x = Sum(New Integer() {1,2,3,4,5,6})
x = Sum(New Integer() {1,2,3})
x = Sum(New Integer() {6,7,8,9})

The ParamArray allows you to skip the array initialization syntax.
(cleaner
usage of Sum).

In fact ParamArray allows you to send either a variable number of
parameters
or a single Array.

Hope this helps
Jay

Nov 21 '05 #8
Thanks Shiva:
I hadn't thought of using ByRef, but that seems the way to go.

D.

"Shiva" <sh******@online.excite.com> wrote in message
news:eP**************@TK2MSFTNGP11.phx.gbl...
Hi,
An easy way to get multiple return values from a function is to use ByRef
parameters. For example:

Sub CalcTimes (ByRef i As Integer, ByRef j As Integer, ByRef k As Integer)
i = 40
j = 49
k = 39
End Sub

Dim a, b, c As Integer
CalcTimes (a, b, c)

After the call, a, b & c will all have the values set by CalcTimes.

I hope this is what you are looking for.


It is exactly. Thanks.
Nov 21 '05 #9
Thanks Imran Koradia,

I'll give it a try. It will give me the opportunity to study Structure
architecture and usage as well.

Thanks,

D.

"Imran Koradia" <no****@microsoft.com> wrote in message
news:uh*************@TK2MSFTNGP09.phx.gbl...
If iAddDays, iAddHours and iAddmins are the values you are returning, you
can just pass them byref and the changes to these values will reflect ones
the procedure returns. In that case, you don't need to define it as
function - you could just define it as a sub.
If you are going to be using those 3 variables often - probably for a lot
of
date-time calculations - you might want to define a structure with the 3
variables and then create a function that returns that structure.
something like:

private Structure DateTimeStruct
dim iAddDays as Integer
dim iAddHours as Integer
dim iAddMins as Integer
end structure

function CalcTimes( ) as DateTimeStruct

and then call it as:
dim myStruct as DateTimeStruct = Me.CalcTimes

just along those lines..

hope that helps..
Imran.

"Dennis D." <te**@dennisys.com> wrote in message
news:ub**************@tk2msftngp13.phx.gbl...
Hello:

I want a function to return three variables to the calling procedure:

Private Function CalcTimes(ByVal iAddDays as Integer, ByVal iAddHours as
Integer, ByVal iAddMins as Integer) As Array

Variable values are calculated in the function.

Calling procedure receives the values preferably into variables of the

same
name.

Like: Me.CalcTimes(iAddDays, iAddHours, iAddMins)

Further use is ...(New TimeSpan(iAddDays, iAddHours, iAddMins, 0))

Could use ParamArray Arguments?

Is As Array correct or should it be As Integer?
Do I need to declare CalcTimes as an array before it is used, or is it an
array by definition?

This is somewhat confusing to me.
Balena's Prog-Vb ParamArray example begins:
Function Sum(ParamArray ByVal args() As Integer) As Integer
Dim index As Integer
For index = 0 to UBound(args)....

So far, I'm getting a debug error. I tried a return statement:
Return CalcTimes(iAddDays, iAddHours, iAddMins)
I'm not even sure about using a return statement here. It immediately
preceeds the End Function statement anyway.
Sorry about being lazy. 5:36AM is near end of the day for me.
Thanks.

D.

--
http://www.dennisys.com/


Nov 21 '05 #10
Cor thanks.
Where we be without tables? "You must make the kettle before you can make
the soup." - a friend.
Ha. Just joking.
I'll give this a try, and thanks for the URL's.

D.

"Cor Ligthert" <no**********@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Dennis,

First of all this text from this page
The Array class is the base class for language implementations that
support
arrays. However, only the system and compilers can derive explicitly from
the Array class. Users should use the array constructs provided by the
language.

http://msdn.microsoft.com/library/de...ClassTopic.asp

And than you can try this sample I made from your question.

I hope this helps?

Cor

\\\
Private Sub Form1_Load(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Dim mydates As Date()
mydates = CalcTimes(Now.Day, Now.TimeOfDay.Hours, _
Now.TimeOfDay.Minutes)
MessageBox.Show(mydates(2).ToString)
End Sub
Private Function CalcTimes(ByVal iAddDays As _
Integer, ByVal iAddHours As Integer, _
ByVal iAddMins As Integer) As Date()
Dim mydate As New Date(2004, 8, iAddDays, _
iAddHours, iAddMins, 0)
Dim mydatetable(2) As Date
mydatetable(0) = mydate
mydate.AddDays(1)
mydatetable(1) = mydate
mydate.AddDays(1)
mydatetable(2) = mydate
Return mydatetable
End Function
///

Nov 21 '05 #11
Thanks CJ,
Public Sub myFunction?
A little late night humor?

I'll try it and see how the calculations react to the pointers. Shouldn't be
a problem. I hadn't thought of using ByRef in this case.

Thanks,

D.

"CJ Taylor" <[cege] at [tavayn] dit commmmm> wrote in message
news:OG**************@TK2MSFTNGP15.phx.gbl...
Make it easy on yoursefl

Public Sub myFunction (byRef iAddDays as Integer, byRef iAddHours as
Integer, byRef iAddMins as integer)

Useing Ref will pass by reference, (just passing the "pointer" in) and
allow you to modify the variables and pass all 3 back.

I have no idea what ParamArray ByVal Params() as Integer will do... never
seen ParamArray before.

-CJ
"Dennis D." <te**@dennisys.com> wrote in message
news:ub**************@tk2msftngp13.phx.gbl...
Hello:

I want a function to return three variables to the calling procedure:

Private Function CalcTimes(ByVal iAddDays as Integer, ByVal iAddHours as
Integer, ByVal iAddMins as Integer) As Array

Variable values are calculated in the function.

Calling procedure receives the values preferably into variables of the

same
name.

Like: Me.CalcTimes(iAddDays, iAddHours, iAddMins)

Further use is ...(New TimeSpan(iAddDays, iAddHours, iAddMins, 0))

Could use ParamArray Arguments?

Is As Array correct or should it be As Integer?
Do I need to declare CalcTimes as an array before it is used, or is it an
array by definition?

This is somewhat confusing to me.
Balena's Prog-Vb ParamArray example begins:
Function Sum(ParamArray ByVal args() As Integer) As Integer
Dim index As Integer
For index = 0 to UBound(args)....

So far, I'm getting a debug error. I tried a return statement:
Return CalcTimes(iAddDays, iAddHours, iAddMins)
I'm not even sure about using a return statement here. It immediately
preceeds the End Function statement anyway.
Sorry about being lazy. 5:36AM is near end of the day for me.
Thanks.

D.

--
http://www.dennisys.com/


Nov 21 '05 #12
Dennis,
Guess what I'm asking is: Where does it all start? Where does all what start?

Programming concepts, OO concepts, Patterns, Framework, Web, Database, the
VB.NET Language itself, methodology (Interaction Design vs. Extreme
Programming)?
I believe there is a white paper for C# on MSDN, I don't know of a white
paper per se for VB.NET. For both C# & VB.NET I've reviewed the "compiler
spec" in MSDN. I find Paul Vick's book "The Visual Basic .NET Programming
Language" from Addison Wesley to be a much easier read then the "compiler
spec" on MSDN. Both are useful.

James S. Miller's "The Common Language Infrastructure Annotated Standard"
also from Addison Wesley, is the "CLI spec" with annotation, which provides
a good insight into how the CLI & CLR itself works...

Hope this helps
Jay

"Dennis D." <te**@dennisys.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl... Thanks Jay. That's a good description of ParamArray. The issue of sending an unknown number of values to a function has been around for decades in
various languages. Here it is again. That's interesting. I had forgotten it.
Back a few decades the proper way to learn a language began with a white
paper. Do they exist for dot net, or would a person begin by studying the
compiler specs? Guess what I'm asking is: Where does it all start?

Thanks again Jay,

D.

"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
CJ
I have no idea what ParamArray ByVal Params() as Integer will do... never seen ParamArray before.


ParamArray allows you to pass a variable number of parameters. You use it when you want to send a list of input parameters to the function, but you don't know before hand how many items will be in that list. That
explicitly
using an array for the call would be inconvenient, for example
Console.Write
where you specify a Format string
http://msdn.microsoft.com/library/de...iteTopic14.asp

For details on ParamArray see:
http://msdn.microsoft.com/library/de...pec7_1_6_4.asp

For example:

Function Sum(ParamArray ByVal args() As Integer) As Integer
...
End Function
x = Sum(1)
x = Sum(1,2,3,4,5,6)
x = Sum(1,2,3)
x = Sum(6,7,8,9)

is Equivalent to:

Function Sum(ByVal args() As Integer) As Integer
...
End Function

x = Sum(New Integer() {1})
x = Sum(New Integer() {1,2,3,4,5,6})
x = Sum(New Integer() {1,2,3})
x = Sum(New Integer() {6,7,8,9})

The ParamArray allows you to skip the array initialization syntax.
(cleaner
usage of Sum).

In fact ParamArray allows you to send either a variable number of
parameters
or a single Array.

Hope this helps
Jay


Nov 21 '05 #13

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

Similar topics

0
by: Anthony Baxter | last post by:
To go along with the 2.4a3 release, here's an updated version of the decorator PEP. It describes the state of decorators as they are in 2.4a3. PEP: 318 Title: Decorators for Functions and...
26
by: Dave Hammond | last post by:
In document "A.html" I have defined a function and within the document body have included an IFRAME element who's source is document "B.html". In document "B.html" I am trying to call the function...
3
by: Gargamil | last post by:
I've written a function to calculate a seriies of parameters based upon some variables. I'd like to be able to return all the parameters to a query. Now all the parameters are interrelated and...
16
by: G Patel | last post by:
Hi, If I want to call functions that don't return int without declaring them, will there be any harm? I only want to assign the function(return value) to the type that it returns, so I don't...
30
by: Will Pittenger | last post by:
Does C# inline functions? I do not see a inline keyword. Is there an implicit inline? Can the compiler select functions for auto-inlining? I am more used to C++ where all these things are...
14
by: Kejpa | last post by:
Hi, I have a function Sum as.... Function Sum(ByVal ParamArray Values() As Double) As Double Dim rSum, itm As Double For Each itm In Values rSum += itm Next Return rSum End Function
5
by: codercoder | last post by:
Hello Helpers, I have a question about passing values through multiple C++ functions: Function A calls function B; Function B calls function C; Function C calls function D; D has two values...
4
by: sofeng | last post by:
The following link shows a chart I created about passing structures among functions. Would you review it and tell me if it requires any corrections? ...
13
by: Chris Carlen | last post by:
Hi: I have begun learning Python by experimenting with the code snippets here: http://hetland.org/writing/instant-python.html In the section on functions, Magnus Lie Hetland writes: ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...

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.