gettingstarted
[Top] [All Lists]

Re: function-passing data ?

To: Getting Started <gettingstarted at lists dot realsoftware dot com>
Subject: Re: function-passing data ?
From: "John Charlesworth http://www.bellacoola.com/?hd" <realbasic_lists at bellacoola dot com>
Date: Thu, 28 Apr 2005 16:18:22 -0700
Delivered-to: gettingstarted at lists dot realsoftware dot com
References: <001a01c5484d$5dc2b410$1a974154 at newa8bavxwdlz0> <426FE352 dot C531A3DC at online dot no> <f75b94f571b903507a16a76324e094f9 at freaksw dot com> <426FEE77 dot C62D82BB at online dot no> <a0620072ebe95a306114f at [10 dot 10 dot 13 dot 4]> <426FF9F7 dot CE54D87 at online dot no> <a06200736be95b0f05411 at [10 dot 10 dot 13 dot 4]> <42700939 dot 38BCF046 at online dot no> <a0620073abe95beb08d37 at [10 dot 10 dot 13 dot 4]> <42701654 dot 1618DDC9 at online dot no> <42715A9F dot 63A117 at online dot no>
You need to use assign FormatData(y) to something (the data= part).

Like this:
'--------------------------------------
Window1.Interpolate:
Sub Interpolate()

  Dim y As Double
  Dim data As String

  y=1234
  data=FormatData(y)  'PASSING Y TO FUNCTION...??

End Sub
'--------------------------------

Hope this helps,
.../j

At 02:50 PM 04/28/2005, Eirik Karlsen wrote:

>Can anyone see what I'm doing woring here:
>'--------------------------------------
>Window1.Interpolate:
>Sub Interpolate()
>
>  Dim y As Double
>  Dim data As String
>
>  y=1234
>  FormatData(y)  'PASSING Y TO FUNCTION...??
>
>End Sub
>'--------------------------------
>
>'-------------------------------
>Window1.FormatData:
>Function FormatData(y As Double) As String
>
>  Dim data As String
>  data="qwerty"
>
>  Return data    'RETURNING DATA AS STRING...??
>End Function
>'---------------------------------
>
>The basic idea was to pass y as double to the function and having it
>return data as string...
>But I get a compilation error:
>"* You must use the value returned by this function in
>Window1.Interpolate, line 7:
>FormatData(y)"

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>