Agreed, it's definitely easier to read, but I had already decided to use a try 
catch statement with the field names, and then do something with the field 
names that would only work if they were valid. If either parameter was anything 
other than the short name of a field or else the long id of a field, it would 
throw an error. Think of all the things someone might attempt to pass. Button 
names, arrays, numbers, group names etc. One statement catches it all. 

Bob S


> On Jun 21, 2018, at 14:46 , Ralph DiMola via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> Option B. I find it easier to see what's going on:
> 
> If pOffset is a number then
> put round(pOffset) into pOffset
> Else
> return "Invalid parameter passed."
> End if        
> 
> Ralph DiMola


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to