` Comment on an Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Add a comment to an Icetips Article

Please add your comments to this article. Please note that you must provide both a name and a valid email address in order for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!

Your Name:  
Email:  
Header text/Subject:  

Please enter your comment in the box below:

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

Clarion in general: Memcpy to get a value from an address
2004-03-11 -- Paul Attryde
 
Newsgroups: softvelocity.clarion.language > I am calling a function that returns that address of a memory location. > How do I get the contents of that location when all I have is the address? So you're doing something (making an API call for example) and getting back a pointer? But because CW doesn't support pointers you can't dereference it? There's a couple of ways to do it. You can do what Bernie suggested and use a reference variable (but that assumes you're using a version of CW that supports reference variables, and this is softvelocity.clarion.language, not softvelocity.public.clarion6) Personally I use memcpy, only because I've been doing this for a while and CW2 didn't have reference variables :) http://www.attryde.com/clarion/cw_prototypes.htm, #8 ISTR Randy Goodhew saying you can do it using PEEK as well, but I've never used that. You may have to search the NGs for more info. -- Paul


Today is May 6, 2024, 10:32 pm
This article has been viewed 35119 times.
Google search has resulted in 116 hits on this article since January 25, 2004.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: