Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!att!dptg!ulysses!andante!mit-eddie!media-lab!adam From: adam@media-lab.MEDIA.MIT.EDU (Adam Glass) Newsgroups: comp.sys.mac.programmer Subject: Ack! I need a floating random from THINK C. Message-ID: <2969@media-lab.MEDIA.MIT.EDU> Date: 21 Jul 90 07:31:01 GMT Distribution: usa Organization: Carnegie Institute of Technology Lines: 18 I'm having a devil of a time trying to get a random number out of THINK C. Short of writing my own random function, how can I do it? Every reference to QD's TickCount() or Random() results in a "illegal use of inline Macintosh function" error. Do I have to #include something specific? This *can't* be that difficult... Anyway, any and all information (including teensy code snippets) would be greatly appreciated. I'd prefer replies via mail, I guess. (Oh: and, being fairly C illiterate, I don't really know how to convert my floating point variables into cute little shorts for QD to draw lines with... I've been using "LineTo((short)mx,(short)my);" (is this "type coersion"?) Is there an easier/faster way to convert from float to short?) Thanks in advance. Adam