Well, I would actually try it as: if (pin->Number && strcmp(pin->Number, "1") == 0) { pin1x = (double) pin->X; Oh the beauty of C ;-) Best regards, -- Tomasz Motylewski