Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!beach!mrimages From: mrimages@beach.gal.utexas.edu Newsgroups: comp.sys.amiga.programmer Subject: 4 bytes to a long? Message-ID: <451.28517f01@beach.gal.utexas.edu> Date: 9 Jun 91 07:06:09 GMT Lines: 18 Is there a fast, simple way to convert 4 bytes into a long? I am doing it presently this way, but it seems kind of kludgy: union { long tlong; char tchar[4]; } mytime; for(i=0;i<4;i++) mytime.tchar[i]=block[i]; sprintf(tempstr,"%s",ctime(&mytime.tlong)); Any suggestions or is this the best I can do? "If all you have is a hammer, please return it to the record store." R. Luebbert = mrimages@beach.gal.utexas.edu (UT Medical Branch Galveston)