Quantcast
Channel: Visual COBOL - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 4356

invoking TRIM and other methods in .Net classes

$
0
0

I searched and searched for how to invoke something like ToString or Trim on a form object in Visual COBOL and did not find anything.  In my testing I found that the "::" works for "dereferencing" in Visual COBOL much the same way that "." works in Visual Basic.  To create a string the has a button in it, I can use this statement: 

MOVE"Button name = [" & btnMenu::Name::Trim& "]" TOWorkString.

This will result in "Button name = [My Button]"

A numeric property value can be converted to a string using ToString.

MOVE"Button name = [" & btnMenu::TabIndex::ToString("0#")::Trim& "]" TOWorkString.

However, currently with version 4, while this works for the MOVE statement, this cannot be used inside a STRING statement.


Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>