home *** CD-ROM | disk | FTP | other *** search
- CONVERT.QPU by 2LT Michael P. Kelly for QuickPascal v1.0
-
- Handy Quick Pascal Unit with which you can convert various data types
- to other data types. Being a C programmer, I was frustrated by the lack of
- conversion available and strict data typing. It is very nice to protect you
- from your own mistakes, but sometimes you must code dangerously to get
- something done.
-
- I hope these routines will eliminate the annoying error messages that
- you get when you are using two different type operands. I am still working
- on a real-integer conversion. Any suggestions can be sent to me at my
- CompuServe address, 73747,420. Maybe the solution to some of these problems
- is right in the on-line help, but I have grown tired of searching endless
- avenues of on-line help. In my opinion, they should have stuck to manuals
- like Borland.
-
- Functions:
-
- FUNCTION INT2CHAR(VALUE : INTEGER) : CHAR;
- FUNCTION CHAR2INT(VALUE : CHAR) : INTEGER;
- FUNCTION CHAR2BYTE(VALUE : CHAR) : BYTE;
- FUNCTION BYTE2CHAR(VALUE : BYTE) : CHAR;
- FUNCTION BYTE2INT(VALUE : BYTE) : INTEGER;
- FUNCTION INT2BYTE(VALUE : INTEGER) : BYTE;
- FUNCTION CHAR2SHORT(VALUE : CHAR) : SHORTINT;
- FUNCTION SHORT2CHAR(VALUE : SHORTINT) : CHAR;
-
- When converting from signed data types to unsigned data types, such as integer
- to character, the integer must have a positive value otherwise the resulting
- return value will be 0.
-
-
- Reach me also at: mkelly@galaxy.afit.af.mil
- mkelly@blackbird.afit.af.mil
-