Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 8705

Type any => is it a string or a range table?

$
0
0

Hi,

 

i've a method which should receive either a range table or a string. If it is a range table (like a select option) the low columns should be converted in a string sepearted by semicolon.

 

So the logic is:

 

if parameter is a string.

  evrything_ok.

elseif parameter is a range table.

  convert_table.

elseif.

  throw an exception. incorrect parameter type.

endif.

 

So my problem is: how can i check if the parameter type is a range table? The brute force coding is

 

1) check if it is a table

2) check if it has 4 columns

3) check if the column names are sign, option, low and high

4) check if column 1 has length 2

5) check if column 2 has length 4

(many other checks)

 

But: isnt there a more simple way to find that out?


Viewing all articles
Browse latest Browse all 8705

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>