Small fragments of ABL code which illustrate some principle or technique
I made this game to emulate Atari's Grand Prix.
You can use this code to view how to use dynamic objects and other functions like includes, and methods.
1. Extract all files,
2. Select car.p and right click, choose RUN under window's context menu or open it with progress procedure editor.
Skype me jaison.antoniazzi for questions.
This is the Haversine formula translated into an ABL procedure. The Haversine formula is used for determining the Great-Circle distance in km between two latitude/longitude references.
Dries Feys was good enough to send out a new base64encode.p file over the peg. I am posting it here for further distribution (and use!)
(Note: Some have said they have had problems with this.)
I'm reading Martin Fowler's refactoring and will work out some of his methods (which also apply to building new software) in this blog. Read this to get some background info:
Below a simple daterangeparameter object, and therebelow a procedure using the daterange object.
A password meter written in ABL.
It is database independent and uses the first connected database for the session.
By default it has 2 levels of strength that can be easily checked for and/or required: Strong Passwords and Xtra Strong Passwords
It checks for the following:
Required for strong passwords:
Length of 12 to 24 characters
Use of all 4 types of characters
Not the same as the previous 5 passwords
No personal names (first or last) and no company names or company acronym (hard-coded).
Required for Xtra strong passwords:
At least 2 upper case letters used
Sometimes it's neccessary to add a Caption in the titlebar to give extra information to the user of your application. The attached file does this, and makes sure the window got redrawn when windows triggers arive.
As you can see, many instances of msgblst32 are added on this window. The goal is to make it more the controlling window which always catches the events on the underlaying session applications. As every window needs its own ocx, I provided 40 instances which are hopefully enough to maintain every window.
I have a video up on amduus.com on how to call out to web services with example coding.
The video can be seen at http://amduus.com/training/Using_bprowsdldoc.html
In this example function you pass to it the format you want YYYYMMDD YYMMDD ISO etc. along with date and time delimiters you wish to use. This does use the NOW statement which is not in older versions.
This set of examples show various methods to test for character, integer, and decimal values.
The various test methods came from a discussion on the PEG and suggestions by members and myself.
Typical time results per 100,000 iterations of the functions.
+--------------------------------------------------+ ¦-123 ¦ ¦ ¦ ¦fn-ISCHAR-loop: 31510 ms no Loop method ¦ ¦fn-ISCHAR: 3681 ms no DEC(x) error method¦
Here is this routine to translate a qty to string, it is spanish, right now, but I guess that is easy to translate to other idioms, in fact, I would like to know if you translate this to other languages.