Function that just to fill an empty space ....
-
I found this on my friend's source code, I wonder the intention of this function .... :confused: He create a function on an Oracle database.
FUNCTION f_init RETURN VARCHAR2 IS vssqlerrm VARCHAR2 (255); vsvalidation VARCHAR2 (255); BEGIN vssqlerrm := ''; vsvalidation := ''; RETURN vsvalidation; EXCEPTION WHEN OTHERS THEN BEGIN vssqlerrm := SQLERRM; vsvalidation := vssqlerrm; END; END;
It's easy to laugh, but, it's so hard to smile ...
-
I found this on my friend's source code, I wonder the intention of this function .... :confused: He create a function on an Oracle database.
FUNCTION f_init RETURN VARCHAR2 IS vssqlerrm VARCHAR2 (255); vsvalidation VARCHAR2 (255); BEGIN vssqlerrm := ''; vsvalidation := ''; RETURN vsvalidation; EXCEPTION WHEN OTHERS THEN BEGIN vssqlerrm := SQLERRM; vsvalidation := vssqlerrm; END; END;
It's easy to laugh, but, it's so hard to smile ...
Maybe it's a template?
-
I found this on my friend's source code, I wonder the intention of this function .... :confused: He create a function on an Oracle database.
FUNCTION f_init RETURN VARCHAR2 IS vssqlerrm VARCHAR2 (255); vsvalidation VARCHAR2 (255); BEGIN vssqlerrm := ''; vsvalidation := ''; RETURN vsvalidation; EXCEPTION WHEN OTHERS THEN BEGIN vssqlerrm := SQLERRM; vsvalidation := vssqlerrm; END; END;
It's easy to laugh, but, it's so hard to smile ...
Maybe he's still paid by line.
I wasn't, now I am, then I won't be anymore.
-
I found this on my friend's source code, I wonder the intention of this function .... :confused: He create a function on an Oracle database.
FUNCTION f_init RETURN VARCHAR2 IS vssqlerrm VARCHAR2 (255); vsvalidation VARCHAR2 (255); BEGIN vssqlerrm := ''; vsvalidation := ''; RETURN vsvalidation; EXCEPTION WHEN OTHERS THEN BEGIN vssqlerrm := SQLERRM; vsvalidation := vssqlerrm; END; END;
It's easy to laugh, but, it's so hard to smile ...
PRE tags please!
FUNCTION f_init
RETURN VARCHAR2
IS
vssqlerrm VARCHAR2 (255);
vsvalidation VARCHAR2 (255);
BEGIN
vssqlerrm := '';
vsvalidation := '';
RETURN vsvalidation;
EXCEPTION
WHEN OTHERS
THEN
BEGIN
vssqlerrm := SQLERRM;
vsvalidation := vssqlerrm;
END;
END;I'm not familiar with that language, but it looks a bit like it's a function that returns an empty string and has some unecessary exception handling. Quite the horror!
-
PRE tags please!
FUNCTION f_init
RETURN VARCHAR2
IS
vssqlerrm VARCHAR2 (255);
vsvalidation VARCHAR2 (255);
BEGIN
vssqlerrm := '';
vsvalidation := '';
RETURN vsvalidation;
EXCEPTION
WHEN OTHERS
THEN
BEGIN
vssqlerrm := SQLERRM;
vsvalidation := vssqlerrm;
END;
END;I'm not familiar with that language, but it looks a bit like it's a function that returns an empty string and has some unecessary exception handling. Quite the horror!
Sorry, but in this case the pre tags don't really help
I wasn't, now I am, then I won't be anymore.
-
Sorry, but in this case the pre tags don't really help
I wasn't, now I am, then I won't be anymore.
Yeah, some languages are hopeless. :)
-
Maybe it's a template?
-
PRE tags please!
FUNCTION f_init
RETURN VARCHAR2
IS
vssqlerrm VARCHAR2 (255);
vsvalidation VARCHAR2 (255);
BEGIN
vssqlerrm := '';
vsvalidation := '';
RETURN vsvalidation;
EXCEPTION
WHEN OTHERS
THEN
BEGIN
vssqlerrm := SQLERRM;
vsvalidation := vssqlerrm;
END;
END;I'm not familiar with that language, but it looks a bit like it's a function that returns an empty string and has some unecessary exception handling. Quite the horror!
aspdotnetdev wrote:
I'm not familiar with that language
Looks like PL-SQL to me.
-
I found this on my friend's source code, I wonder the intention of this function .... :confused: He create a function on an Oracle database.
FUNCTION f_init RETURN VARCHAR2 IS vssqlerrm VARCHAR2 (255); vsvalidation VARCHAR2 (255); BEGIN vssqlerrm := ''; vsvalidation := ''; RETURN vsvalidation; EXCEPTION WHEN OTHERS THEN BEGIN vssqlerrm := SQLERRM; vsvalidation := vssqlerrm; END; END;
It's easy to laugh, but, it's so hard to smile ...
Have you asked your friend?
-
Maybe it's a template?
PL-SQL supports overloading...