` Create a string reference and disposing of it (Alexey Solovjev) - Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Icetips Article

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

Clarion in general: Create a string reference and disposing of it
2003-08-31 -- Alexey Solovjev
 
Newsgroups: sv.clarion.compilers Hello, > From: carl barnes > Date: 31 Aug 2003 21:39:52 -0400 > It seems like there should be a simple way to return a NEW STRING and not leak > and not use a STATIC. I looked thru the Help and don't see it. Does following program do what you want? ===== PROGRAM MAP S(UNSIGNED),*STRING END Ref &STRING,AUTO CODE Ref &= S (80) Ref = ALL ('*', SIZE(Ref)) MESSAGE (Ref, 'Test') DISPOSE (Ref) RETURN S PROCEDURE (UNSIGNED L) RS &STRING,AUTO CODE RS &= NEW STRING (L) RETURN RS =====


Today is November 21, 2024, 3:39 am
This article has been viewed 35206 times.
Google search has resulted in 7 hits on this article since January 25, 2004.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: