pike.git / lib / modules / Geography.pmod / Position.pike

version» Context lines:

pike.git/lib/modules/Geography.pmod/Position.pike:30:   //! @decl void create(string lat, string long)   //! @decl void create(string both)   //!   //! Constructor for this class. If fed with strings,   //! it will perform a dwim scan on the strings. If they   //! fails to be understood, there will be an exception.   //!   void create(void|int|float|string _lat,    void|int|float|string _long, void|float _alt)   { -  if(zero_type(_lat)) return; +  if(undefinedp(_lat)) return;    if (stringp(_lat))    { -  if (zero_type(_long)) +  if (undefinedp(_long))    {    string tmp;    if (sscanf(_lat,"%sN %s",tmp,_long)==2) _lat=tmp+"N";    else if (sscanf(_lat,"%sS %s",tmp,_long)==2) _lat=tmp+"S";    else if (sscanf(_lat,"%sW %s",tmp,_lat)==2) _long=tmp+"W";    else if (sscanf(_lat,"%sE %s",tmp,_lat)==2) _long=tmp+"N";    else if (sscanf(_lat,"%s %s",tmp,_long)==2) _lat=tmp;    }    _lat=dwim(_lat,"NS");    if (stringp(_lat))