Invalid function call (number of arguments do not agree) using user-defined function
Posted: August 12th, 2018, 11:46 pm
Newby and need assistance to this:
Followed functions to simplify looking up geographic names from the examples with a little modification. However, encounter error: Invalid function call (number of arguments do not agree)
function string LookupGeographyName(province, municipal,barangay)
GEOCODE_PROVINCE = province;
GEOCODE_MUNICIPAL = municipal;
GEOCODE_BARANGAY = barangay;
GEOCODE_EA = notappl;
if loadcase(LMIS_GEOCODE_DICT, GEOCODE_PROVINCE, GEOCODE_MUNICIPAL, GEOCODE_BARANGAY, GEOCODE_EA) then
LookupGeographyName = strip(GEOCODE_AREA_NAME);
else
LookupGeographyName = "<Invalid Geocode>";
endif;
end;
red dot point to this line:
function string LookupProvinceName(province)
LookupProvinceName = LookupGeographyName(province, notappl);
end;
Followed functions to simplify looking up geographic names from the examples with a little modification. However, encounter error: Invalid function call (number of arguments do not agree)
function string LookupGeographyName(province, municipal,barangay)
GEOCODE_PROVINCE = province;
GEOCODE_MUNICIPAL = municipal;
GEOCODE_BARANGAY = barangay;
GEOCODE_EA = notappl;
if loadcase(LMIS_GEOCODE_DICT, GEOCODE_PROVINCE, GEOCODE_MUNICIPAL, GEOCODE_BARANGAY, GEOCODE_EA) then
LookupGeographyName = strip(GEOCODE_AREA_NAME);
else
LookupGeographyName = "<Invalid Geocode>";
endif;
end;
red dot point to this line:
function string LookupProvinceName(province)
LookupProvinceName = LookupGeographyName(province, notappl);
end;