Generic Command Line Parser for Delphi 10.3.x

You know the feeling. You need a specific input from your command line, but you can’t find something lightweight that does the job. Hence, the FDC.CommandLine was born.

Creative Commons Licence
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

You can use – / or + as a switch, and use : or = as a flag for parameters.
/option:parameter

You can use single and double quotes to be able to parse parameters that contain spaces and quotes.
/quoteoftheday:”This is a ‘quoted’ parameter”

It also supports lists of parameters.
/inputfiles:(file1.txt , “file with space.txt”)

Take a look at the TestFDCCommandLine.dpr for more examples of how it works.

Continue reading “Generic Command Line Parser for Delphi 10.3.x”

Gamasutra – The source code for Infocom’s classic text adventures is now on Github

The entire source code for a huge array of Infocom text adventures and interactive stories is now available on Github, thanks to historian and archivist Jason Scott.

https://github.com/historicalsource?tab=repositories

Among the titles are:
– Zork I, II, III
– Leather Godesses of Phobos
– Nord and Bert Couldn’t make Head or Tail of it
– Stationfall
– Hitchhiker’s Guide to the Galaxy
– Bureaucracy

Source: Gamasutra – The source code for Infocom’s classic text adventures is now on Github

Something safe for New Year’s Eve :)

Something safe for New Year’s Eve 🙂

Jan Horn wrote this, December the 29th in 2001! Just add Variants to the uses clause in the .dpr file to get past the “NULL not found” error.

Someone should port this to FireMonkey 🙂

Update: Upon trying to find Jan’s current whereabouts, I sadly learned that Jan Horn no longer is among us.  May he rest in peace, and be remembered fondly.

http://www.sulaco.co.za/news_in_loving_memory_of_jan_horn.htm

#opengl     #sourcecode  

OutputDebugString override

OutputDebugString override

Simple override for Windows.OutputDebugString which adds a timestamp, thread id and memory, and an overloaded string version to get rid of those pesky pChar casts.

The output shows up in the in the BDS Event Log, or it can be captured while running live with Sysinternal’s DebugView (http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx).

CustomDebugOut.pas – http://pastebin.com/GM7DE18L

#delphi   #sourcecode