AnsweredAssumed Answered

VRF - VEE double

Question asked by VRFuser on Feb 5, 1996
From:           "Ondrej Valter" <>
    To:             VRf
    Date sent:      6 Feb 1996  1300  MET-1
    Subject:       No proper function of double in VEE

   I would like to ask you for help in solving the below mentioned
problems with double in HP VEE product.
   I'm creating DLL for Windows 3.1 by Microsoft C 7.00. There are no
problems with creating the DLL (I follow the recomendations for
compiler and linker options described in HP Product Note 2120-3(HP
VEE for Windows) ). The problems occur during the running DLL with
double under the VEE. I have a HP VEE version 3.1 and 3.12 release on
2.2.95 and 7.7.95 respectively.
   Almost nothing is possible in the case of using double as a
parametr of function (called both by value and by reference). There
are 2 types of errors:

a) General Protection Fault in vee.exe or in *.dll in the programs
like these:

long FAR CDECL Zkouska(double FAR *data)
   double *pom;

*data=2*(*pom);     // GENERAL PROTECTION FAULT ('GPF') in .dll
    {   return ((long)0);}

double FAR CDECL Zkouska(double data)
   double dd;


   { return(dd);} // GPF in VEE.EXE

long FAR CDECL Zkouska(double FAR *data)
double *pom;


if((*data) > (double)(*pom))  // GPF !
  { return((long)10);}
  { return((long)1);}


b) Returning the constant value independent on the result   
   of function:  

long FAR CDECL Zkouska(double FAR *data)
  *data = (double) ((*data)+1.);  
  { return((long)0);}
  // returns *data=4419.3424 e249, for subtraction -4419...

long FAR CDECL Zkouska(double FAR *data)
   double pom;

pom /=2;    
{return ((long)0);}

// returns multiples of 4419.. acording to the *data value assigned
in VEE  

On the other side this function works properly:

long FAR CDECL Zkouska(double FAR *data)
  return((long) 0);

    The demonstrated examples prove there is something wrong in
treatment of double in HP VEE. If you want, send me please your
experience with using of double in VEE and ,if you know, the
recomendation how to overcome above mentioned problems.

My email address is:

     Thank you and best regards
           Ondrej Valter