A
A
animr2015-05-19 15:06:18
Delphi
animr, 2015-05-19 15:06:18

How to check field value is numeric or character?

Please tell me how to check the received field value is numeric or character.
Type of the following code, the code not working, for an example resulted:
var
varVariablePole : String;
begin
varVariablePole := ExcelApp.Range['A'+IntToStr(varCounter)];
if not (varVariablePole in ['1'..'0']) then varP_visible := 0;

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Viktor Koltcov, 2015-05-19
@animr

use TryStrToFloat

R
Ravil Zaripov, 2015-05-20
@RZaripov

possible via
if Pos('.', varVariablePole ) > 0 then
ShowMessage('Point found')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question