ITERATION / REPETITION
FOR LOOP
This simple program that I created is a for loop statement. it use only a command button and it will shown at the form.
ICE DECASTRO
Sunday, March 20, 2011
Wednesday, March 2, 2011
PROGRAM READABILITY
MEANINGFUL IDENTIFIERS
I use dim of course, sHex, sDec, SOct. it is use for converting a number to the decimal, hexadecimal and octal.
LOGIC STRUCTURE
for the iteration that i use is if then else statement and do while loop.
CODE PRACTICE
Dim tmp As String
Dim n As Long
n = DecimalNum
tmp = Trim(Str(n Mod 2))
n = n \ 2
Do While n <> 0
tmp = Trim(Str(n Mod 2)) & tmp
n = n \ 2
Loop
DecToBin = tmp
NOTES AND COMMENTS
I didn't use comments because you will know what is their function of each code.
PROGRAM DOCUMENTATION
PROGRAM LISTING
I use Text Box when you would enter a number and another text box for showing the answer.
I use Option Box for choosing the decimal, Hexadecimal and Octal.
PROGRAM SPECIFICATION
for this program I use Visual Basic 6.0, then this program shows what will be the convertion of the number you enter.
FILE LAYOUT AND RECORD DESCRIPTION
none
OPERATING INSTRUCTIONS
I use text box for entering a number, then in the option box you can choose what will you be converted with.
Wednesday, February 9, 2011
1. ʾĀlep is the reconstructed name of the first letter of the Proto - Canaanite alphabet, continued in descended Semitic alphabet as Phoenician Aleph
, Syriac 'Ālaph ܐ, Hebrew Aleph א, and Arabic ʾAlif ا.
Example
Example
eastbound(A) :-
has_car(A,B).
[5/5]
eastbound(A) :-
has_car(A,B), short(B).
[5/5]
eastbound(A) :-
has_car(A,B), open_car(B).
[5/5]
eastbound(A) :-
has_car(A,B), shape(B,rectangle).
[5/5]
[theory]
[Rule 1] [Pos cover = 5 Neg cover = 0]
eastbound(A) :-
has_car(A,B), short(B), closed(B).
[pos-neg] [5]
output:
Actual
+ -
+ 5 0 5
Pred
- 0 5 5
5 5 10
Accuracy = 100%
2. ABAP (Advanced Business Application Programming) - is a high-level programming language created by the German Software company SAP. It is currently positioned, alongside the more recently introduced JAVA.
Example
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_ebeln-low.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = s_ebeln-low
IMPORTING
output = s_ebeln-low.
perform form_search_help.
IF sy-subrc <> 0.
CASE sy-subrc.
WHEN 2.
LEAVE TO SCREEN 1000.
ENDCASE.
ELSE.
LOOP AT it_ebeln.
IF sy-tabix = p_ebeln.
s_ebeln-low = it_ebeln.
EXIT.
ENDIF.
ENDLOOP.
ENDIF.
3. Ada - is a structured, statically typed, imperative, wide-spectrum, and object-oriented high-level computer programming language, extended from Pascal and other languages.
Example
with Ada.Text_IO, Ada.Integer_Text_IO;
use Ada;
procedure Simple is
type Integer_Pointer is access Integer;
A,B: Integer_Pointer := null;
C: Integer;
begin
A := new Integer;
A := new Integer'(17);
B := new Integer'(32);
Integer_Text_IO.Get (Item => A.all);
Integer_Text_IO.Put (Item => B.all);
C := A.all + B.all;
-- copy the value
A.all := B.all;
-- make an alias
A := B;
A.all := 49;
Integer_Text_IO.Put (Item => B.all);
end Simple;4. ABC - is an imperative general-purpose programming language and programming environment developed at CWI,Netherlands by Leo Geurts, Lamber Meertens, and Steven Pemberton.
Example:
HOW TO ADVENTURE:
START
GET command
WHILE command <> "quit":
OBEY command
GET command
FINISH5. ALgae - is an interpreted programming language for numerical analysis, a branch of mathematics. Its interactive interpreter is available under GPL. The language and its implementation were designed by Scott Hunziker and Mike Brennan starting in 1994.
Example
# power: raise `x' to the `n'-th power
power = function (x; n)
{
local (y);
y = x;
while (n > 1)
{
y = y * x;
n -= 1;
}
return y;
};
power (2; 8)?
power ([ 1, 2; 2, 3 ]; 4)?
comparison of ABC and ABAP
ABC is structured intend to be use instead BASIC, Pascal and CWK but ABAP introduced by JAVA somewhat similar to COBOL
Saturday, February 5, 2011
WHAT IS PROGRAMMING LANGUAGES..
A vocabulary and set of grammatical rules for instructing a computer to perform specific tasks. The term programming language usually refers to high-level languages, such as BASIC, C, C++, COBOL, FORTRAN, Ada, and Pascal. Each language has a unique set of keywords (words that it understands) and a special syntax for organizing program instructions. High-level programming languages, while simple compared to human languages, are more complex than the languages the computer actually understands, called machine languages. Each different type of CPU has its own unique machine language.
Lying between machine languages and high-level languages are languages called assembly languages. Assembly languages are similar to machine languages, but they are much easier to program in because they allow a programmer to substitute names for numbers. Machine languages consist of numbers only.
Lying above high-level languages are languages called fourth-generation languages (usually abbreviated 4GL). 4GLs are far removed from machine languages and represent the class of computer languages closest to human languages.
Lying between machine languages and high-level languages are languages called assembly languages. Assembly languages are similar to machine languages, but they are much easier to program in because they allow a programmer to substitute names for numbers. Machine languages consist of numbers only.
Lying above high-level languages are languages called fourth-generation languages (usually abbreviated 4GL). 4GLs are far removed from machine languages and represent the class of computer languages closest to human languages.
Subscribe to:
Posts (Atom)