A group to provide help with the Ada programming language.
Adalog is pleased to announce the release of AdaControl 1.14. As usual, this release features new controls (meter says 421!), new features, bug fixes…
More importantly, it compiles with Gnat GPL2012! A change in the ASIS interface prevented the previous version from compiling with the latest versions of GNAT. AdaControl is now provided in two flavors, one for the ”old” GNAT, and one for the recent one. Features are the same, except that some controls related to Ada2005/2012 are not available with the ”old” version.
As usual, AdaControl can be downloaded from:
Can anyone help me with the follow Ada problem I am doing for school. I do not even know where to start that I need some sort of loop and need to use the character.handling package and the ASCII table. Here is the problem:
Problem 1: Secret Decoder Ring
You may remember Ralphie’s disappointment when he received his Little Orphan Annie Secret Decoder Ring.
What you may not realize is that, after Ralphie threw away his ring, his brother Randy dug it out of the trash. Randy grew up to run the IT department of his small hometown bank, and was responsible for storing the 4-digit Personal Identification Numbers (PINs) chosen by his bank’s customers. He knew better than to store these PINs in the clear, so he encrypted them using Ralphie’s ring.
The decoder ring had two wheels, one printed with letters and one printed with numbers. In the video clip, you see Ralphie decoding the numbers read on the radio, looking up each number and copying down the corresponding letter. Randy uses the ring in a similar way, but instead of disguising letters as numbers, he does the reverse, disguising numbers as letters. To encrypt a PIN, he finds each digit on the wheel, and turns it into a letter. (The ring contains some two-digit numbers as well, but he ignores those, using only the single-digit numbers.)
Here is a small portion of the decoder ring:
number wheel -> 0 1 2 3 4 5 6 7 8 9
letter wheel -> U R O V A L T I N E
So, for example, Randy encrypts the PIN 9537 as ELVI.
Complete the function Encrypt(PIN) that takes a 4-digit PIN (as a string) and returns the corresponding 4-letter code (also as a string).
Note: It would be possible to convert digits to letters using a giant IF statement, but don’t do this. Instead, the letter wheel is given to you as a string, so use each digit to read the appropriate letter from the string.
A new version of AdaControl is available from http://www.adalog.fr/adacontrol2.htm Apart from a number of new rules (412 checks!) and bug fixes as usual, this version is now able to process Ada2005 code without choking. This required updating a number of rules (for example, all rules dealing with return must now handle the extended return statement). [...]
I agree. Just look at Microsoft Windows and just how fragile the system is. I would imagine that if OS vendors started thinking outside the box and wrote their OSes in Ada, they would be more stable, more robust and wouldn’t be as vulnerable to viruses and the like
The Ada spelling/language server presentation by Jacob Sparre http://goo.gl/rmbWd
Short Ada-DK blurb about the GNAT GPL 2011 release http://goo.gl/lnCYq
New GNAT GPL, AWS, Florist, XML/Ada, GNATcoll and more from http://libre.adacore.com Exciting!
Ada-DK updated with news about the latest Ada 95 Booch Components release. http://goo.gl/ovQ0D
Reporting from the latest open Ada-DK meeting. Great fun, as usual http://goo.gl/9JLgR
Accessing memory as a String using Ada. Written by Robert Dewar. http://goo.gl/po94n