Highlighted
Absent Member.
Absent Member.
994 views

Convert VB Code

Jump to solution

hi, does anyone know how to convert VB code below in to cobol?

ChrW(&HF0A0)

where ChrW = 

https://msdn.microsoft.com/en-us/library/microsoft.visualbasic.strings.chrw(v=vs.110).aspx

and &HF0A0 = 

https://msdn.microsoft.com/en-gb/library/ms819564.aspx

Thanks in advance.

Kind regards

Neil.

0 Likes
1 Solution

Accepted Solutions
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Convert VB Code

Jump to solution

Sorry, forgot to add one piece of information. You need to add a reference in your project to the Microsoft.VisualBasic.dll assembly and then my example should work.

View solution in original post

0 Likes
4 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Convert VB Code

Jump to solution

Something like this should do it:

     $set ilusing"Microsoft.VisualBasic"

          declare mychar as type Char = type Strings::ChrW(h"F0A0")
          display mychar

0 Likes
Highlighted
Absent Member.
Absent Member.

RE: Convert VB Code

Jump to solution

hi chris,

ive done it long hand because i couldnt get your way to work.

so ive ended up with

declare mychar as type System.Char = type Microsoft.VisualBasic.Strings::ChrW(h"F0A0")

however it errors on the Microsoft.VisualBasic.Strings bit with

COBCH0845 : unknown type 'Microsoft.VisualBasic.Strings'

Can you pla advise

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Convert VB Code

Jump to solution

Sorry, forgot to add one piece of information. You need to add a reference in your project to the Microsoft.VisualBasic.dll assembly and then my example should work.

View solution in original post

0 Likes
Highlighted
Absent Member.
Absent Member.

RE: Convert VB Code

Jump to solution

yep thats it many thanks chris

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.