Code archives/File Utilities/Simple file output debugger
This code has been declared by its author to be Public Domain code.
Download source code
| |||||
Simply include this in your project(Via an include for easy on/off switching) and it'll convert all file calls to read/writeline, so your text output and input is converted, allowing you to easily debug custom formats.(As you can now read the output in any text editor in plain english.) The cool bit is that it's automatic, just include it "Include "SDebugFile.bb" and your already wrote code will use it, as it swaps around built in func calls. Simple..but nice ;) | |||||
Function ReadInt(file) return ReadLine(file) End Function Function ReadFloat#(file) return ReadLine(file) End Function Function ReadString$(file) return ReadLine(file) End Function Function WriteInt(file,val) WriteLine file,val End Function Function WriteFloat(File,val#) WriteLine file,val End Function Function WriteString(file,val$) WriteLine file,val End Function |
Comments
| ||
At first I was thinking 'Has Ant gone stupid?' then I decided to read the whole description. Of course, the next train of thought was 'Nifty'. |
| ||
m'sorry, but it dont do a thing with my code...automatically... aaaaaahhhhh... it's kinda overriding/overloading them built-in funcs with userdefined ones. Is this legal??? :) |
| ||
totally illegal, but I always was a rebel. Noel, bullet train or slow coach? :) |
| ||
Spaced: One which has been wrecked at the side of the tracks for ages. |
Code Archives Forum