Posts

The SWAG Pascal Archive

Image
Way back in 1997 the old SWAG archive of Pascal code was closed down. There have been a few attempts to resurrect it over the years, with a HTML version being released in 2003. Unfortunately some of the mirrors have now been closed down. Never heard of SWAG? Well this is what the original authors said about it: SWAG is a collection of source code and program examples for the PASCAL programming language. The material has been donated by various PASCAL programmers from around the world ... SWAG packets are available in 57 different categories covering EVERY aspect of the PASCAL language ... SWAG is intended to be a teaching and learning aid for users of the PASCAL language. Whether you are a beginner or experienced programmer, you'll find SWAG to be an invaluable source of ideas and information. After some discussion with a couple of Delphi & Pascal coders it would seem there's still some interest in preserving the archive in the hope it might be useful to others. Anyhow, whe...

The two faces of SHR

Like Marek Mauder in his blog post from 2009, I have run into a problem because of the different implementations of the right shift operator ( shr in Pascal) in different languages. There I was happily translating some code from Java to Object Pascal when I encountered Java's >>> operator. A quick look at the Java docs tells me this is a logical right shift. No problem, just use shr . Next I found Java's >> operator. This time its an arithmetic (sign preserving) right shift. Problem - no Pascal equivalent, and since operation was on signed integers I couldn't just use shr because there's a bug waiting to happen should any of the integers go negative. Marek (above) said that replacing a >> 1 with a div 2 ; worked for him. This is fine for a single bit shift, so I thought I would see if it scaled for shifts of more than one bit. I tried dividing by 2 to the power of the number of bits to shift: function SAR ( Value : LongInt ; Shift : Byte ...

Shiny new XE3 and ditching old Delphis

Just installed my first Delphi update since the marvellous Delphi 2010. I sneaked in just in time to get Delphi XE3 pro from Grey Matter with a free copy of HTML5 Builder. Not had chance to get to grips with XE3 or HTML5 Builder get, but have tasks in mind for both. XE3 is silky smooth on my relatively new ASUS development laptop, so I'm pleased with the pairing. Or perhaps its the fact that my previous development machine was a five year old Dell box that everything seems so fast at the moment! No, what really got me tapping the keyboard is to say how much I appreciate getting license for Delphis back to 2007 + Delphi 7 as part of the XE3 licenses. Good on you Embarcadero! I've never managed to acquire such a complete set before. I find them useful for testing my ddab-lib code library and for running tests on code in the Code Snippets Database . So over the next weeks I'll be testing the code library with Delphi 2007, 2009, XE, XE2 and XE3 and making any necessary tweaks....

CodeSnip project hosting changes now complete

I recently gave notice that my CodeSnip project was being migrated to the new "Allura" forge software by SourceForge, and then decided to move CodeSnip 's Subversion source code repository to GoogleCode . I'm pleased to announce that the migrations are now complete and have been tested. Here are the relevant links: Online source code browser: http://code.google.com/p/codesnip/source/browse/ Committed changes: http://code.google.com/p/codesnip/source/list Check-out URL for Subversion clients: http://codesnip.googlecode.com/svn/trunk/ Note: Checkouts are read-only. To commit you need to be a project member. Contact me if you want to join the project. Some of the old Subversion URLs may keep working for a while, but the the old repository will not be updated. CodeSnip 's download files (source and executable) remain on SourceForge at: https://sourceforge.net/projects/codesnip/files/ . The bug report and feature request trackers remain on SourceForge but have n...

Code Snippets Database Version Support - Update

Back in September in gave notice that I was going to cease supporting CodeSnip versions up to and inlcuding v2 when adding new snippets to my Code Snippets Database (see my post " Code Snippets Database Version Support "). This post is just to confirm that the last updates to the database that will be visible in CodeSnip versions 1 and 2 have just been released today . This also means that the online version of the database, which has similar characteristics to CodeSnip 2 , will no longer be able to "see" new database updates. So, if you want to keep on getting or viewing updates to the database you need to do one of: Update to the latest version of the CodeSnip program. View the snippets using the new Code Snippets Database – Take 2 web app, which is in early beta at present. If it's new year's eve where you live, have a happy new year!

CodeSnip source now moving to GoogleCode

Well, I've migrated the CodeSnip project to SourceForge's new Allura forge, and I think the Subversion repo software stinks! Lots of external links into the repo that I rely on in documentation can't be made to work as I want and the whole repo support seems badly thought out to me. So, I'm planning to move the repo to GoogleCode , which at least I know quite well because I host some other projects there. I'm afraid this means that the migration will take even longer than I suspected - sorry for that if you're waiting to use the repo. I'll post again as promised once the new links are active. For the time being, downloads and bugs / feature requests will still be kept on SourceForge. UPDATE (3rd Jan 2013): All the changes to CodeSnip 's hosting are now complete - more info .

CodeSnip project moving home on SourceForge

Over the next few days SourceForge will be migrating the CodeSnip project to their new "Allura" forge. If you access CodeSnip 's Subversion source code repository or download CodeSnip updates from SourceForge you will find that the project may not be available at times. UPDATE 1: CodeSnip's source is now going to be moved to GoogleCode . See " CodeSnip source moving to GoogleCode " for more info. UPDATE 2: All the changes to CodeSnip 's hosting are now complete - details . Once the migration is complete the URLs used to access the Subversion repo will change. Once the new URLs are working I will post them here and on CodeSnip 's download page on my website. Sorry about the interuption but SourceForge have given notice that all projects now need to be migrated. I just hope the glitches I noted in my mini review a few posts ago have been fixed.