Skip to main content

Implicitly Type

  • September 17, 2018
  • 2 replies
  • 0 views

Is there a way to implicitly type a variable in visual cobol?

For example, in C#, if I have the statement:

var myResult = myFunction(parm, parm2);

The type of myResult will be whatever type that myFunction returns.

Is there a cobol equivalent to the above function call?

Thanks,

Mike


#VisualCOBOL

2 replies

Chris Glazier
Forum|alt.badge.img+2
  • Moderator
  • September 17, 2018

Is there a way to implicitly type a variable in visual cobol?

For example, in C#, if I have the statement:

var myResult = myFunction(parm, parm2);

The type of myResult will be whatever type that myFunction returns.

Is there a cobol equivalent to the above function call?

Thanks,

Mike


#VisualCOBOL
declare myResult = myFunction(parm, parm2)

  • September 18, 2018

Is there a way to implicitly type a variable in visual cobol?

For example, in C#, if I have the statement:

var myResult = myFunction(parm, parm2);

The type of myResult will be whatever type that myFunction returns.

Is there a cobol equivalent to the above function call?

Thanks,

Mike


#VisualCOBOL
Thanks, Chris. That worked just fine.