` Dynamic strings using iDynStr interface (Dennis E. Evans) - 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: Dynamic strings using iDynStr interface
2003-06-25 -- Dennis E. Evans
 
Newsgroups: TopSpeed.Topic.Language Hi all, "Dave Harms" wrote in message > Can you be more specific? A small example program and prj file are attached. I think the IDynStr interface rates up there with Super Crunchy Peanut Butter on pancakes, too bad there is not any documentation. Dennis Project file follows at the end of the code: teststr.clw: program include('dynstr.inc'),once map ShowCStr(*cstring) ShowStr(string s) main() end DynQ queue dStr &IDynStr end x long strVar string(50) holder &cstring code main() return main procedure() code strVar = 'This is another string' DynQ.dStr &= NewDynStr() add(DynQ) DynQ.dStr &= NewDynStr() add(DynQ) get(dynQ, 1) dynQ.dStr.cat('This is the first string') get(dynq, 2) dynQ.dStr.cat(strVar) loop x = 1 to records(dynq) get(dynq, x) message('just show the string in a loop ||' & dynq.dstr.str()) end get(dynq, 1) ShowStr(DynQ.dStr.CStr()) get(dynq, 2) ShowStr(DynQ.dStr.CStr()) get(dynq, 1) ShowCStr(DynQ.dStr.CStr()) get(dynq, 2) ShowCStr(DynQ.dStr.CStr()) get(dynq, 1) DisposeDynStr(dynq.dStr) get(dynq, 2) DisposeDynStr(dynq.dStr) free(dynq) return ShowCStr procedure(*cstring s) code message('inside procedure with a *cstring parameter || ' & s) return ShowStr procedure(string s) code message('inside procedure with a string parameter || ' & s) return -- teststr #noedit #system win32 #model clarion dll #pragma debug(vid=>full) #compile "testStr.clw" #link "testStr.exe"


Today is November 21, 2024, 4:18 am
This article has been viewed 75039 times.
Google search has resulted in 57 hits on this article since January 25, 2004.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: