f



How to pass address and get the value from function in REALbasic?

Hi,

I am a newbie to REALbasic and have a simple query

What will be the equivalent code in REALbasic

Code:
void* handle; ===> pointer to handle
getUniqueHandle(someParam, &handle); ==>2nd parameter will be & hanldle
 

Thanks and Regards, 
Rohit Dhamija

0
rohit
9/28/2006 3:48:29 PM
comp.lang.basic.realbasic 2744 articles. 0 followers. spam127 (8) is leader. Post Follow

1 Replies
272 Views

Similar Articles

[PageSpeed] 24

In article <1159458509.075869.26570@i3g2000cwc.googlegroups.com>,
 "rohit" <rohit.dhamija@gmail.com> wrote:

> What will be the equivalent code in REALbasic
> 
> Code:
> void* handle; ===> pointer to handle
> getUniqueHandle(someParam, &handle); ==>2nd parameter will be & hanldle

In REALbasic, you wouldn't do this unless you're dealing with Declares.  
REALbasic itself doesn't use pointers and handles; it uses object 
references.  What exactly are you trying to accomplish?

If you're just asking how you can have a method modify one of the 
caller's parameters, you use "ByRef" for this.  For example:

Sub Increment( ByRef i As Integer )
  i = i + 1
End Sub

Sub SomeplaceElse()
  Dim foo As Integer = 41
  Increment foo
  MsgBox "Foo is now: " + str(foo)
End Sub


HTH,
- Joe
0
Joe
9/28/2006 4:00:11 PM
Reply:

Similar Artilces:

Class and object confusing - passing to function
Hi there, I have a bit of confusion which I'm sure will be easily explained by the experts here. I'm implementing a class which had worked well for getting values from a DB and representing them as an object. However, I however, I'm confused by behavior when passing a object value to another class function as it's value does not seem to get sent to the class function. The class contains a public function which loads many values into a public variable for the class. Therefore something like this: class { public $DBrowArray; // After a DB call is loaded with an array wh...

Passing &handle in function in REALbasic. How?
Hi, I am a newbie to REALbasic and have a simple query What will be the equivalent code in REALbasic Code: void* handle; ===> pointer to handle getUniqueHandle(someParam, &handle); ==>2nd parameter will be & hanldle Thanks and Regards, Rohit Dhamija ...

pass by value or pass by address?
void f (char *a) { a++; } int main (void) { char a[] = "abc";// or char *a = "abc"; f (a); puts (a); return 0; } Looks it is 'pass by address'. The result is 'abc' instead of 'bc'. So actually it is 'pass by value'. What happened? thanks. Vol Vols wrote: > void f (char *a) > { > a++; > } > > int main (void) > { > char a[] = "abc";// or char *a = "abc"; > f (a); > puts (a); > return 0; > } > > Looks it is 'pass by address'. The result is 'abc&...

How to pass a function to a function?, and how to pass the variables of the function?
I'd like to write a function like: function f(){ ... bla ...} f_example(f); function f_example($function_to_execute) {...bla... $function_to_execute() ...bla....} AND how to pass the variable of the function : function f_example($function_to_execute($var1,$var2)) {...bla... $function_to_execute() ...bla....} Thank you in advance for the time you'll spend for me, Andrea. I'm sorry, I don't quite understand what you are asking... If you are asking how to use results of a function in another function then you should do this. function test1() { return "Hello Wor...

passing the value get from an edit text to a listbox callback function
How can I pass the value got from an edit text item: user_entry_epochs = str2double(get(hObject,'string')); to a listbox_callback function? Please answer...It is extremely important... "Nick Nichols" <christoss@gmail.com> wrote in message news:ef4ad8c.-1@webcrossing.raydaftYaTP... > How can I pass the value got from an edit text item: > user_entry_epochs = str2double(get(hObject,'string')); > > to a listbox_callback function? > Please answer...It is extremely important... Why not have the listbox's callback function extract the String fro...

How to get function Name against function address of vtable?
Hello, I need to call the co-class function by reading its address from vtable of COM exposed interface methods. I need some generic way to read addresses. Now I need to call the function, which would have specific address(NOT KNOWN) arguments(parameters) which I have collected from TLB, and name as well. How that address corresponds to that function name to which I am going to call. For this I need to traverse vtable which is holding functional addresses, LASTLY need to correspond function address with NAME of that function. This is I dont know. How? More over one function wit...

How to get function Name against function address of vtable?
Hello, I need to call the co-class function by reading its address from vtable of COM exposed interface methods. I need some generic way to read addresses. Now I need to call the function, which would have specific address(NOT KNOWN) arguments(parameters) which I have collected from TLB, and name as well. How that address corresponds to that function name to which I am going to call. For this I need to traverse vtable which is holding functional addresses, LASTLY need to correspond function address with NAME of that function. This is I dont know. How? More over one function wit...

Passing array valued functions as argument to function.
Hi all, I've spent several years working with Fortran 95, yet somehow I've never needed to write functions which use other functions as arguments until today. I've struggled to make sense of this from the books I have to hand (no M&R just now). The purpose of the code will be to compute a definite integral of the passed function. Here's a toy code example of what I naively expected to work: MODULE one CONTAINS FUNCTION f1(x_in) RESULT (y_out) DOUBLE PRECISION :: x_in(:) DOUBLE PRECISION :: y_out(SIZE(x_in)) y_out = 2*x_in END FUNCTION f1 END MODULE one...

When passing functions as args, how to pass extra args for passed function?
When I pass a function as an arg, like for map(...), how do I pass args to use for that function? If I have a function like this: def pretty_format(f, fmt='%0.3f'): return fmt % f I want to use it with map() like this: formatted = map(pretty_format, unformatted_list) #exept I want fmt='%4.5f' !!! I need to figure out how to pass a non-default value for fmt. How do I do that? On Tue, 16 Sep 2003 17:08:53 -0400 (EDT), rumours say that python@sarcastic-horse.com might have written: >When I pass a function as an arg, like for map(...), how do I pass args to >us...

Issue passing a stem to a function! used the value() function.
Hello everyone, I'm trying to pass a stem variable to a function and I'm having issues after looking at this tutorial. It says to pass a stem variable to the function the following way: /*stem example*/ call rxfuncadd 'sysloadfuncs', 'rexxutil', 'sysloadfuncs' call sysloadfuncs data.0 = 3 data.1 = "hi" data.2 = "hello" data.3 = "lawlz" call mysub 'data', data.0 mysub: parse arg array, n do i = 1 to n if value(array'.i') < 0 then do call value array'.i', 0 say array.i end end But th...

[Q] REALBasic developed with REALBasic (to REALSoftware)
Hello. I was told that REALBasic (IDE & Co.) is developed with REALBasic itself. My questions are: - Is this true? - Is it developed only with REALBasic and "nothing else"? Or are additional plugins and or other development environments used? (I wonder because I see a lot of features in REALBasic IDE that I don't know how to implement in REALBasic...) Pascal. In article <1132232928.165312.264420@g43g2000cwa.googlegroups.com>, "Pascal" <pascalchiotasso@yahoo.fr> wrote: > I was told that REALBasic (IDE & Co.) is developed wit...

Passing Value from one function to another function in MATLAB GUI!
Hi, Here is the screenshot of my GUI: http://i54.tinypic.com/iemg7o.png In the pushbutton1 of File Path which has Browse written over it, I have used the following code: function pushbutton1_Callback(hObject, eventdata, handles) [FILENAME, PATHNAME] = uigetfile; And in the pushbutton2 which has Send! written over it, I have used the following code: function pushbutton2_Callback(hObject, eventdata, handles) input_sec_info=get(handles.edit1,'String'); Encoder(input_sec_info,FILENAME, PATHNAME); Now that the pushbutton2 passes input_sec_info,FILENAME, PATHNAME as arguments to Encod...

What value should be passed to make a function use the default argument value?
Suppose I have this function: def f(var=1): return var*2 What value do I have to pass to f() if I want it to evaluate var to 1? I know that f() will return 2, but what if I absolutely want to pass a value to f()? "None" doesn't seem to work.. Thanks in advance. LaundroMat <Laundro@gmail.com> wrote: > What value do I have to pass to f() if I want it to evaluate var to 1? > I know that f() will return 2, but what if I absolutely want to pass a > value to f()? "None" doesn't seem to work.. I don't know if I understand correctly here but: def f...

Trying to pass values of variables from a redefined function into another function
Here's the problem: I have a function that references another one in this manner: class circleType: public pointType so, pointType is redefined by circleType, thereby giving circleType access to all the functions in pointType if need-be. Here is the function I am using in pointType: void pointType::setCoords(double xCoord, double yCoord) { pointX = xCoord; pointY = yCoord; } it is being accessed in circleType in this manner: void circleType::getCoords(double xCoord, double yCoord) { //set the external point using the pointType header pointType::setCoords(pointX, pointY); co...

Web resources about - How to pass address and get the value from function in REALbasic? - comp.lang.basic.realbasic

App Store - Paperless Lite: Lists + Checklists
Get Paperless Lite: Lists + Checklists on the App Store. See screenshots and ratings, and read customer reviews.

Flickr Services
Flickr is almost certainly the best online photo management and sharing application in the world. Show off your favorite photos and videos to ...

Hotline Communications - Wikipedia, the free encyclopedia
Hotline Communications Limited (HCL) was a software company founded in 1997, based in Toronto , Canada, with employees also in the United States ...

OSX/Leverage.a Analysis - AlienVault
Tell Us Your Thoughts & Enter to Win an iPad Mini. Take Our Survey Now » Search Partners Support Login Products & Solutions Explore Unified Security ...

ATPM - Reviews Viewed by Product Name
Skip to Content Skip to Table of Contents ATPM - About This Particular Macintosh About Archive Desktop Pictures Links Networking Reviews ← Previous ...

BASIC: Making a case for an old favorite
... popular with many users, so they deserve to be highlighted. Basic4Android BlitzMax IWBasic Creative Basic Free Basic Pure Basic RealBasic ...

Most Popular Mac Downloads - CNET Download.com
Come to CNET Download.com for the most popular Mac software on the Web. All downloads are safe, trusted, and spyware-free. Includes MP3 and audio ...

旧专题 « 创意纪
关于 旧专题 search skip to content ↓ 创意纪 安静的生活 Home UX/UE UE实例 摄影 lightroom photoshop 摄影作品 模特 汽车与美女 新闻事件 体育 娱乐 社会 第三方支付 经济 琐事记录 中国汽车网 免费虚拟主机 创意纪 小说散文 ...

Math Software for Mac - Free downloads and reviews - CNET Download.com
The most downloaded Math Software software, including Year 7 Interactive Maths (2nd Ed) - Home Licence, Units Wizard, and ISA

Component X
Bosco's Screen Share 3 It has never been easier to show your friend exactly what is happening on your computer. You have a Mac, your friend ...

Resources last updated: 1/30/2016 7:03:41 PM