OK, this seems absolutely ridiculous that I need to ask these questions but they're killing me.
1) How does one check for NAN? There's no constant defining NAN, no method isNAN so how can I tell if a variable is actually NAN - which in my case is actually null.
2) How do you get a record count from a table. I've been through all the table functions but cannot seem to find it. I need to know how many records are in a table.
Thanks in advance!
Hi Peter,
From memory just
public someVariable
If someVariable = NaN then
'do something
someVariable = -9999999999
EndIf
Should do it. As for the current record
public recNumber, battVolts
DataTable(test,True,-1)
DataInterval(0,5,min,0)
Sample(1,battVolts,FP2)
EndTable
recNumber = test.record(1,1)
Hope that helps.
Cheers
Ryan
As Ryan points out, NAN is a predefined constant in the datalogger, so you can use it in your expressions (there is a list in the CRBasic Editor of predefined constants).
If you look in the help file index under "data table access" there are functions to return information from tables. One of the options is "TableSize". So, based on Ryan's example above,
RecNumber = Test.TableSize(1,1)
Dana