Page 1 of 1

User defined functions or procedures with return variables

Posted: Thu Jun 12, 2014 4:15 am
by ErikG
Hi,

Is it possible to create user defined "@" functions, or in any other way create user defined subroutines, procedures or programmes, perhaps using an add-in or a registered user object, with specific return values that can be accessed by using the equality sign (=) ?

I've witten lots of code to calculate things that I subsequently access by specifying the name of an object in the workfile that should contain the information that is calculated, for instance my subroutine for division of all elements in a matrix by the row sums of the matrix:


Call DivideByRowSums(mx,"NameOfANewMatrix")

But I'd really like to be able to write this as:

mANewMatrix = mx.@DivideByRowSums

The problem with the first method is partly that the code is less legible, and secondly that I it is a bit difficult to use % and ! variables in direct connection to the use of my own subroutines and programs, and my workfile gets cluttered with a lot of temporary objects.

Thanks,

/Erik Glans
NIER, Sweden.
Standard Edition Eviews 8, Jun 4 build.

Re: User defined functions or procedures with return variabl

Posted: Thu Jun 12, 2014 4:36 am
by EViews Gareth
Unfortunately not.