User defined functions or procedures with return variables

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

ErikG
Posts: 85
Joined: Wed Jan 23, 2013 1:18 am

User defined functions or procedures with return variables

Postby ErikG » Thu Jun 12, 2014 4:15 am

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.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: User defined functions or procedures with return variabl

Postby EViews Gareth » Thu Jun 12, 2014 4:36 am

Unfortunately not.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests