17 43857
"Roland Hall" <nobody@nowhere> wrote in message
news:uJ*************@TK2MSFTNGP14.phx.gbl... Is there a way to return multiple values from a function without using an array? Would a dictionary object work better?
-- Roland Hall
s = Func()
Response.Write(s)
Function Func()
Const A = "a"
Const B = "b"
Const C = "c"
Func = A & "," & B & "," & C
End Function
Or do you consider a CSV string an array?
Whether a Dcitionary would be "better" depends on what are you trying to
do...
Roland Hall schrieb: Is there a way to return multiple values from a function without using an array? Would a dictionary object work better?
There is a third alternative: Make your own "datatype" by defining a class
that has all values you need:
Class MyClass
Public Value1
Public Value2
Public Value3
End Class
Function ReturnMyClass
Dim c
set ReturnMyClass = new MyClass
ReturnMyClass.Vlalue1 = "1"
ReturnMyClass.Vlalue2 = "2"
End Function
Jan
"McKirahan" wrote in message news:0Z********************@comcast.com...
: "Roland Hall" <nobody@nowhere> wrote in message
: news:uJ*************@TK2MSFTNGP14.phx.gbl...
: > Is there a way to return multiple values from a function without using
an
: > array? Would a dictionary object work better?
: >
: > --
: > Roland Hall
:
: s = Func()
: Response.Write(s)
:
: Function Func()
: Const A = "a"
: Const B = "b"
: Const C = "c"
: Func = A & "," & B & "," & C
: End Function
:
: Or do you consider a CSV string an array?
:
: Whether a Dcitionary would be "better" depends on what are you trying to
: do...
Thank you for your suggestion.
If I returned my values as a string, then I'd have to parse it after my
call.
My question was kind of vague. I was trying to pass two return values
without having to do it with an array and I didn't want to make 2 calls to
the function or call 2 functions. I actually wanted named pairs. this=
some value, that= some value
I normally use functions as: result = myFunc(param1, param2, ...)
So, I can pass multiple parameters to the function but I was only receiving
one result. I have a need for two and possibly more in the future.
My function calls 4 other functions that do return arrays and at points I
have quite a few arrays in memory.
I first looked using a dictionary object but I can't make it work. It
appears either it is not possible or it's me. I saw in VB 6 I could return
the whole dictionary object but in vbscript, it appears I can only return
keys or items but not both. In VB 6, 'set' is used on the return. ASP
(vbscript) bit the dust when I tried that.
Ex.
function myFunc(param1, param2)
' create dictionary object
dim d
set d = CreateObject(...)
d.Add "string", value
...
set myFunc = d
end function
Now, myFunc = d.Keys or myFunc = d.Items works fine but I need the key and
item values or I have to index them.
So, I started reading about classes and that appears to be the right
approach. I'm just going to have more reading to do.
--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
"Jan Peter Stotz" wrote in message
news:1m*******************************@40tude.net. ..
: Roland Hall schrieb:
:
: > Is there a way to return multiple values from a function without using
an
: > array? Would a dictionary object work better?
:
: There is a third alternative: Make your own "datatype" by defining a class
: that has all values you need:
:
: Class MyClass
: Public Value1
: Public Value2
: Public Value3
: End Class
:
: Function ReturnMyClass
: Dim c
: set ReturnMyClass = new MyClass
: ReturnMyClass.Vlalue1 = "1"
: ReturnMyClass.Vlalue2 = "2"
: End Function
Jan...
Thank you for your response. I started reading about classes today and it
appears this is the right approach for this application. It's just new to
me and will require some research to implement it. This helps.
--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
"Roland Hall" <nobody@nowhere> wrote in message
news:#p**************@TK2MSFTNGP15.phx.gbl... "McKirahan" wrote in message news:0Z********************@comcast.com... : "Roland Hall" <nobody@nowhere> wrote in message : news:uJ*************@TK2MSFTNGP14.phx.gbl... : > Is there a way to return multiple values from a function without using an : > array? Would a dictionary object work better? : > : > -- : > Roland Hall : : s = Func() : Response.Write(s) : : Function Func() : Const A = "a" : Const B = "b" : Const C = "c" : Func = A & "," & B & "," & C : End Function : : Or do you consider a CSV string an array? : : Whether a Dcitionary would be "better" depends on what are you trying to : do...
Thank you for your suggestion.
If I returned my values as a string, then I'd have to parse it after my call. My question was kind of vague. I was trying to pass two return values without having to do it with an array and I didn't want to make 2 calls to the function or call 2 functions. I actually wanted named pairs. this= some value, that= some value
I normally use functions as: result = myFunc(param1, param2, ...) So, I can pass multiple parameters to the function but I was only
receiving one result. I have a need for two and possibly more in the future.
My function calls 4 other functions that do return arrays and at points I have quite a few arrays in memory.
I first looked using a dictionary object but I can't make it work. It appears either it is not possible or it's me. I saw in VB 6 I could
return the whole dictionary object but in vbscript, it appears I can only return keys or items but not both. In VB 6, 'set' is used on the return. ASP (vbscript) bit the dust when I tried that.
Ex.
function myFunc(param1, param2) ' create dictionary object dim d set d = CreateObject(...) d.Add "string", value ... set myFunc = d end function
Now, myFunc = d.Keys or myFunc = d.Items works fine but I need the key and item values or I have to index them. So, I started reading about classes and that appears to be the right approach. I'm just going to have more reading to do.
-- Roland Hall /* This information is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. */ Technet Script Center - http://www.microsoft.com/technet/scriptcenter/ WSH 5.6 Documentation -
http://msdn.microsoft.com/downloads/list/webdev.asp MSDN Library - http://msdn.microsoft.com/library/default.asp
To extend your thoughts...
Declare the dictionary outside of all functions (globally) then add to the
Dictionary by assigning the name=value pair to the Item and make the Key
something that you'll reference later; (such as "a", "b", etc.)
' create dictionary object
Dim d
Set d = CreateObject("Scripting.Dictionary")
Call myFunc(param1, param2)
Set d = Nothing
function myFunc(param1, param2)
d.Add "a","string1=" & value1
d.Add "b","string2=" & value2
...
set myFunc = d
end function
"McKirahan" wrote in message news:Ye********************@comcast.com...
: Declare the dictionary outside of all functions (globally) then add to the
: Dictionary by assigning the name=value pair to the Item and make the Key
: something that you'll reference later; (such as "a", "b", etc.)
:
: ' create dictionary object
: Dim d
: Set d = CreateObject("Scripting.Dictionary")
: Call myFunc(param1, param2)
: Set d = Nothing
:
: function myFunc(param1, param2)
: d.Add "a","string1=" & value1
: d.Add "b","string2=" & value2
: ...
: set myFunc = d
: end function
I think this is the problem I had with the Dictionary object:
"set" myFunc = d
Usually it's just myFunc = d
Also, once you set d = nothing, the dictionary object is gone.
--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
"Roland Hall" <nobody@nowhere> wrote in message
news:#i**************@TK2MSFTNGP15.phx.gbl... "McKirahan" wrote in message news:Ye********************@comcast.com...
: Declare the dictionary outside of all functions (globally) then add to
the : Dictionary by assigning the name=value pair to the Item and make the Key : something that you'll reference later; (such as "a", "b", etc.) : : ' create dictionary object : Dim d : Set d = CreateObject("Scripting.Dictionary") : Call myFunc(param1, param2) : Set d = Nothing : : function myFunc(param1, param2) : d.Add "a","string1=" & value1 : d.Add "b","string2=" & value2 : ... : set myFunc = d : end function
I think this is the problem I had with the Dictionary object:
"set" myFunc = d
I should have removed that line from ny code.
Usually it's just myFunc = d Also, once you set d = nothing, the dictionary object is gone.
Yes, but I was setting to Nothing after it was no longer referenced (or so I
thought -- I don't know all your code). -- Roland Hall
"McKirahan" wrote in message news:m-********************@comcast.com...
: "Roland Hall" <nobody@nowhere> wrote in message
: news:#i**************@TK2MSFTNGP15.phx.gbl...
: > "McKirahan" wrote in message news:Ye********************@comcast.com...
: >
: > : Declare the dictionary outside of all functions (globally) then add to
: the
: > : Dictionary by assigning the name=value pair to the Item and make the
Key
: > : something that you'll reference later; (such as "a", "b", etc.)
: > :
: > : ' create dictionary object
: > : Dim d
: > : Set d = CreateObject("Scripting.Dictionary")
: > : Call myFunc(param1, param2)
: > : Set d = Nothing
: > :
: > : function myFunc(param1, param2)
: > : d.Add "a","string1=" & value1
: > : d.Add "b","string2=" & value2
: > : ...
: > : set myFunc = d
: > : end function
: >
: > I think this is the problem I had with the Dictionary object:
: >
: > "set" myFunc = d
:
: I should have removed that line from ny code.
:
: > Usually it's just myFunc = d
: > Also, once you set d = nothing, the dictionary object is gone.
:
: Yes, but I was setting to Nothing after it was no longer referenced (or so
I
: thought -- I don't know all your code).
Ok, I see what you're getting at. I can access the keys and values outside
the function if it's public instead of private.
--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
"Jan Peter Stotz" wrote in message
news:1m*******************************@40tude.net. ..
: Roland Hall schrieb:
:
: > Is there a way to return multiple values from a function without using
an
: > array? Would a dictionary object work better?
:
: There is a third alternative: Make your own "datatype" by defining a class
: that has all values you need:
:
: Class MyClass
: Public Value1
: Public Value2
: Public Value3
: End Class
:
: Function ReturnMyClass
: Dim c
: set ReturnMyClass = new MyClass
: ReturnMyClass.Vlalue1 = "1"
: ReturnMyClass.Vlalue2 = "2"
: End Function
Ok, it appears this is what you're referring to but I am still calling the
function twice or am I doing something wrong?
<%@ Language=VBScript %>
<%
Option Explicit
Response.Buffer = True
class shipping
public m_ups
public m_freight
end class
function getXMLShipping()
set getXMLShipping = new shipping
getXMLShipping.m_ups = "1.00"
getXMLShipping.m_freight = "2.00"
end function
dim shipUPS, shipFreight
shipUPS = getXMLShipping.m_ups
shipFreight = getXMLShipping.m_freight
Response.Write "UPS: " & shipUPS & "<br />" & vbCrLf & "Freight: " &
shipFreight & vbCrLf
%>
Perhaps I need to provide more information as to what I have and my intended
goal.
I have a function.
getXMLShipping(custNum)
custNum is a value of a cookie.
I call this function to get the shipping information for products being
sold. When only accepting a single carrier, it worked well. Now that I am
adding additional carriers it needs to be altered above the alterations I am
doing converting all files to XML.
The function gets information by calling 3 other functions.
1. get the shopping cart items based on custNum
2. get the UPS rate chart which returns the chart of rates per zone
3. get the zone the customer zip code falls within
I then look at each item, determine the shipping carrier for that item and
add it to the appropriate total while calculating weight * quantity of
items.
For items shipped by UPS, I then take the total weight for that zone and
calculate it against the rate/ounce of that zone and then convert oz to lb
and round up to the next lb.
For items shipped by freight I call a function that is passed the zip code
and total weight and I am returned the freight cost.
Now comes my dilemma. I need to return from the function UPS shipping and
freight shipping. Because freight shipping is so expensive, I need them
separate so I can show UPS shipping costs and freight rather than a total.
--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
"Roland Hall" <nobody@nowhere> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
[snip] I first looked using a dictionary object but I can't make it work. It appears either it is not possible or it's me. I saw in VB 6 I could
return the whole dictionary object but in vbscript, it appears I can only return keys or items but not both. In VB 6, 'set' is used on the return. ASP (vbscript) bit the dust when I tried that.
Ex.
function myFunc(param1, param2) ' create dictionary object dim d set d = CreateObject(...) d.Add "string", value ... set myFunc = d end function
Now, myFunc = d.Keys or myFunc = d.Items works fine but I need the key and item values or I have to index them. So, I started reading about classes and that appears to be the right approach. I'm just going to have more reading to do.
Your function looks fine. I believe your problem was that you were
forgetting to use the SET statement when you assigned the return value of
the function to a variable. The following worked for me:
<%
Function myFunc(param1, param2)
' create dictionary object
Dim d
Set d = CreateObject("Scripting.Dictionary")
d.Add "A", "Apple"
d.Add "B", "Banana"
d.Add "C", "Carrot"
Set myFunc = d
End Function
Dim d
Set d = myFunc("param1","param2")
Response.Write d("A")
%>
"Chris Hohmann" wrote in message
news:el*************@TK2MSFTNGP09.phx.gbl...
: "Roland Hall" <nobody@nowhere> wrote in message
: news:%2****************@TK2MSFTNGP15.phx.gbl...
:
: [snip]
: > I first looked using a dictionary object but I can't make it work. It
: > appears either it is not possible or it's me. I saw in VB 6 I could
: return
: > the whole dictionary object but in vbscript, it appears I can only
return
: > keys or items but not both. In VB 6, 'set' is used on the return. ASP
: > (vbscript) bit the dust when I tried that.
: >
: > Ex.
: >
: > function myFunc(param1, param2)
: > ' create dictionary object
: > dim d
: > set d = CreateObject(...)
: > d.Add "string", value
: > ...
: > set myFunc = d
: > end function
: >
: > Now, myFunc = d.Keys or myFunc = d.Items works fine but I need the key
and
: > item values or I have to index them.
: > So, I started reading about classes and that appears to be the right
: > approach. I'm just going to have more reading to do.
:
: Your function looks fine. I believe your problem was that you were
: forgetting to use the SET statement when you assigned the return value of
: the function to a variable. The following worked for me:
:
: <%
: Function myFunc(param1, param2)
: ' create dictionary object
: Dim d
: Set d = CreateObject("Scripting.Dictionary")
: d.Add "A", "Apple"
: d.Add "B", "Banana"
: d.Add "C", "Carrot"
: Set myFunc = d
: End Function
:
: Dim d
: Set d = myFunc("param1","param2")
: Response.Write d("A")
: %>
Oh, set outside the function. I didn't think of that. Makes sense, since
it is an object. Doh!
Thanks Chris. I'll try that.
--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
Roland Hall wrote: Is there a way to return multiple values from a function without using an array? Would a dictionary object work better?
You can return multiple arguments in a function's parameter list, since
function arguments are call-by-reference by default . So, for example,
' the call...
Dim strA, strB, strC, s
IF ( Func(strA, strB, strC) = 0 )then
Response.Write(s, strA, strB, strC)
....
' The called function...
Function Func(A, B, C)
A = "a"
B = "b"
C = "c"
Func = 0
End Function
"Michael D. Kersey" wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
: Roland Hall wrote:
: > Is there a way to return multiple values from a function without using
an
: > array? Would a dictionary object work better?
: >
: You can return multiple arguments in a function's parameter list, since
: function arguments are call-by-reference by default . So, for example,
:
: ' the call...
: Dim strA, strB, strC, s
: IF ( Func(strA, strB, strC) = 0 )then
: Response.Write(s, strA, strB, strC)
: ...
:
: ' The called function...
: Function Func(A, B, C)
: A = "a"
: B = "b"
: C = "c"
: Func = 0
: End Function
I have the dictionary solution working but what if I'm passing different
variables than I'm returning?
Your timing was almost perfect. It answered another question of something I
worked around but didn't understand why it was happening.
I'll see if I can give an example...
dim gVar, result
gVar = "abcde"
function test(pVar)
pVar = left(pVar,3)
Response.Write gVar ' returns abc
test = pVar
end function
result = test(gVar)
It appears that since it is passed byRef, the original is changed when I
change what I thought was a private variable. If I change it to this:
function test(byVal pVar)
pVar = left(pVar,3)
Response.Write gVar ' returns abc
test = pVar
end function
gVar is no longer modified when I change pVar. It makes sense but I've
never experienced this issue before and should have on this very function,
although now what I used as an example here.
--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
Roland Hall schrieb: Ok, it appears this is what you're referring to but I am still calling the function twice or am I doing something wrong?
Yes, you are calling the function twice. Call it once and save the object
for future use:
dim ship
set ship = getXMLShipping
Response.Write "UPS: " & ship.m_ups & "<br />" & vbCrLf & "Freight: " & _
ship.m_freight & vbCrLf
Jan
"Jan Peter Stotz" <jp*****@gmx.de> wrote in message
news:8n******************************@40tude.net.. .
: Roland Hall schrieb:
:
: > Ok, it appears this is what you're referring to but I am still calling
the
: > function twice or am I doing something wrong?
:
: Yes, you are calling the function twice. Call it once and save the object
: for future use:
:
: dim ship
: set ship = getXMLShipping
:
: Response.Write "UPS: " & ship.m_ups & "<br />" & vbCrLf & "Freight: " & _
: ship.m_freight & vbCrLf
Thanks Jan.
--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
Roland Hall wrote: "Michael D. Kersey" wrote in message news:%2****************@TK2MSFTNGP12.phx.gbl... : Roland Hall wrote: : > Is there a way to return multiple values from a function without using an : > array? Would a dictionary object work better? : > : You can return multiple arguments in a function's parameter list, since : function arguments are call-by-reference by default . So, for example, : : ' the call... : Dim strA, strB, strC, s : IF ( Func(strA, strB, strC) = 0 )then : Response.Write(s, strA, strB, strC) : ... : : ' The called function... : Function Func(A, B, C) : A = "a" : B = "b" : C = "c" : Func = 0 : End Function
I have the dictionary solution working but what if I'm passing different variables than I'm returning?
All variables in the parameter list are passed. When using the default
of call-by-refererence (ByRef), whether an argument is an input to the
function, an output of the function or both input/output depends on how
you code the function.
Suppose a values is _defined_ (not necessarily initialized) in the
calling program and passed as a ByRef argument to the
function/subroutine. The function/subroutine can return anything in that
argument. Above strA, strB, and StrC are not explicitly initialized by
the calling program; the called function sets them.
Your timing was almost perfect. It answered another question of something I worked around but didn't understand why it was happening.
I'll see if I can give an example...
dim gVar, result gVar = "abcde"
function test(pVar) pVar = left(pVar,3) Response.Write gVar ' returns abc test = pVar end function
result = test(gVar)
It appears that since it is passed byRef, the original is changed when I change what I thought was a private variable. If I change it to this:
function test(byVal pVar) pVar = left(pVar,3) Response.Write gVar ' returns abc
Should be pVar-----^^^^, gvar is still "abcde" test = pVar end function
gVar is no longer modified when I change pVar. It makes sense but I've never experienced this issue before and should have on this very function, although now what I used as an example here.
As you note, when an argument is passed ByRef, changes made in the
called function/subroutine affect the passed variable in the calling code.
I usually think of calling ByRef as pushing a pointer to the variable
onto the stack and think of calling ByVal as pushing the contents of the
variable on the stack.
Defining function/subroutine arguments as ByVal can ensure that passed
variables are not modified inadvertently. But calling ByVal can be
significantly more costly: contrast passing ByVal a large structure
(e.g. an array, recordset, or dictionary object) where the entire
structure must be pushed onto the stack versus passing it ByRef, where
only a pointer to the array is pushed onto the stack.
"Michael D. Kersey" wrote in message
news:e8****************@TK2MSFTNGP10.phx.gbl...
: Roland Hall wrote:
: > Your timing was almost perfect. It answered another question of
something I
: > worked around but didn't understand why it was happening.
: >
: > I'll see if I can give an example...
: >
: > dim gVar, result
: > gVar = "abcde"
: >
: > function test(pVar)
: > pVar = left(pVar,3)
: > Response.Write gVar ' returns abc
: > test = pVar
: > end function
: >
: > result = test(gVar)
: >
: > It appears that since it is passed byRef, the original is changed when I
: > change what I thought was a private variable. If I change it to this:
: >
: > function test(byVal pVar)
: > pVar = left(pVar,3)
: > Response.Write gVar ' returns abc
: Should be pVar-----^^^^, gvar is still "abcde"
No, I mean gVar. When it was passed with byRef, by default, modifying the
length of pVar changed the length of gVar. I guess I never noticed it
before because I probably never modified the passed variable but rather
reassigned it to something else as:
gVar = "abcde"
function test(pVar)
dim npVar
npVar = left(pVar,3)
...
end function
--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Asif Rahman |
last post by:
Hi all!
Please improve on the following code to make sure the record gets deleted
only when the function returns false. Now I see the msgbox, but the record
gets deleted no matter the user...
|
by: ASPfool |
last post by:
Hello everyone,
Please help me before I throw my computer out of the window:
I'm working on a web application in classic ASP (vbscript), which is making
calls to some webservices. The calls...
|
by: Joe Caverly |
last post by:
Hi,
I'm using Visual C++ 32-bit Professional Edition 5.0
Using Microsoft Knowledge Base Article 181473 as a basis, I'm trying
to transform this VB Code;
Dim sc As Object
Dim code As String...
|
by: Mike MacSween |
last post by:
Just spent a happy 10 mins trying to understand a function I wrote sometime
ago.
Then remembered that arguments are passed by reference, by default.
Does the fact that this slowed me down...
|
by: Materialised |
last post by:
I am writing a simple function to initialise 3 variables to pesudo
random numbers.
I have a function which is as follows
int randomise( int x, int y, intz)
{
srand((unsigned)time(NULL));
x...
|
by: Nikolay Petrov |
last post by:
How can I return multiple values from a custom function?
TIA
|
by: Karl O. Pinc |
last post by:
I want to return multiple values, but not a set, only a single row,
from a
plpgsql function and I can't seem to get it to work. (I suppose I'd be
happy to return a set, but I can't seem to make...
|
by: ben.carbery |
last post by:
Hi,
I have just written a simple program to get me started in C that
calculates the number of days since your birthdate.
One thing that confuses me about the program (even though it works) is...
|
by: Fabian Steiner |
last post by:
Hello!
I have got a Python "Device" Object which has got a attribute (list)
called children which my contain several other "Device" objects. I
implemented it this way in order to achieve a kind...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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,...
|
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...
|
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,...
|
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...
| |