﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
898	Can I define a function whose existence is unkown to me	imendez	Víctor de Buen Remiro	"Hi, I have a doubt about the functions definition.

When I can't know if a certain global variable (A) exists, I can define it using ObjectExist code:

{{{
Real If(ObjectExist(""Real"", ""A""), ?, Real A = 4);
}}}

This works right.
However, in the case of a function, I'm not sure about how must I define it:

{{{
Real If(ObjectExist(""Code"", ""MultiplicaPorDos""), ?, Real MultiplicaPorDos(Real n) { 2*n });
Real m = MultiplicaPorDos(3);
}}}

The code above seems to work right, because variable ""m"" is created, but an error message is shown:

{{{
ERROR: [1] No ha sido posible convertir de Code hacia Real para el objeto 'MultiplicaPorDos'
}}}

Is this an error of mine in programming or is it an error of TOL?
"	doubt	closed	low		Kernel	1.1.7	minor	fixed		
