Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Bomy Island Main Forum (https://forums.graalonline.com/forums/forumdisplay.php?f=80)
-   -   Delphi Programming... (https://forums.graalonline.com/forums/showthread.php?t=12117)

Krakken_2001 09-17-2001 07:10 AM

Delphi Programming...
 
Is there anyone here who knows Delphi programming. I am learning from a book but am finding it very boring and tedious when all I want to know right now are a few little things. I would be most greatful if I could get a tutor or something similar.

This is on topic because I need it to make the Tempest Installer.

galen 09-17-2001 07:13 AM

My suggestion is to forget Delphi all together and move on to move on to something worth learning such as C/C++, PHP/GTK+, VC++, or *urk* VB

Krakken_2001 09-17-2001 07:16 AM

Quote:

Originally posted by galen
My suggestion is to forget Delphi all together and move on to move on to something worth learning such as C/C++, PHP/GTK+, VC++, or *urk* VB
I know PHP, I know C++ aswell but I like Delphi. It's nice and easy for quick applications.

galen 09-17-2001 07:41 AM

here, have a shell sort
NPC Code:

Procedure ShellSort(var List: Group; var cntr, cntr2: Integer);
Var {Sorts the words and replaces them in}
loc,
gap, {the array}
maxNum : Integer;
temp : String[4];
change : Boolean;
Begin
ClrScr;
cntr := 0;
cntr2 := 0;
gap := Trunc(max div 2);
While gap > 0 do
Begin
Repeat
change := false;
For loc := min to max - gap do
Begin
inc(cntr2, 1);
If List[loc] > List[loc + gap]
then Begin
temp := List[loc];
List[loc] := List[loc + gap];
List[loc + gap] := temp;
inc(cntr, 1);
change := true;
End;
End;
Until change = false;
gap := Trunc(gap div 2);
End;
End;


galen 09-17-2001 07:44 AM

or how about a tree
NPC Code:

Program Trees;

Uses CRT;

Type
ptr = ^nodetype;
nodetype = record
info: String;
left: ptr;
right: ptr;
end;

Var
sel: Char;
ch: String;
root: ptr;
LEVEL: Integer;

{///////////////////////////////////////////////////////////////////////}
Procedure Add(var r:ptr; val:String);
Var
node, curr, prev: ptr;
Begin
new(node);
node^.info := val;
node^.left := nil;
node^.right := nil;
If r = nil then
r := node
Else Begin
curr := r;
prev := r;
While curr <> nil do
Begin
prev := curr;
If val < curr^.info then
curr := curr^.left
Else curr := curr^.right;
End;
If prev^.info > val then
prev^.left := node
Else prev^.right := node;
End;
End;
{///////////////////////////////////////////////////////////////////////}
Procedure Print(curr:ptr);
Begin
If curr <> nil then
Begin
Print(curr^.left); {L}
WriteLn(curr^.info); {N}
Print(curr^.right); {R}
End;
End;
{///////////////////////////////////////////////////////////////////////}
Procedure TreePrint(curr:ptr);
Begin
inc(LEVEL, 1);
If curr <> nil then
Begin
TreePrint(curr^.right); {R}
WriteLn(curr^.info:LEVEL * 5); {N}
TreePrint(curr^.left); {L}
End;
dec(LEVEL, 1);
End;
{///////////////////////////////////////////////////////////////////////}
Begin
root := nil;
LEVEL := -1;
ClrScr;
Repeat
{ClrScr;
GotoXY(1,1);}
{ BackDrop;
MenuCreator(34,10,5,'A','Add','B');
MenuCreator(34,11,5,'P','Print','C');
MenuCreator(34,12,5,'Q','Quit','E');}
WriteLn('(A)dd');
WriteLn('(P)rint');
WriteLn('(Q)uit');
WriteLn;
WriteLn;
Repeat
sel := ReadKey;
Until sel <> '';
sel := UpCase(sel);
Case sel of
'A': Begin
Write('Enter in a character: ');
ReadLn(ch);
Add(root, ch);
End;
'P': Print(root);
'T': TreePrint(root);
End;
Until sel = 'Q';
End.


Krakken_2001 09-17-2001 07:45 AM

Quote:

Originally posted by galen
here, have a shell sort
NPC Code:

Procedure ShellSort(var List: Group; var cntr, cntr2: Integer);
Var {Sorts the words and replaces them in}
loc,
gap, {the array}
maxNum : Integer;
temp : String[4];
change : Boolean;
Begin
ClrScr;
cntr := 0;
cntr2 := 0;
gap := Trunc(max div 2);
While gap > 0 do
Begin
Repeat
change := false;
For loc := min to max - gap do
Begin
inc(cntr2, 1);
If List[loc] > List[loc + gap]
then Begin
temp := List[loc];
List[loc] := List[loc + gap];
List[loc + gap] := temp;
inc(cntr, 1);
change := true;
End;
End;
Until change = false;
gap := Trunc(gap div 2);
End;
End;


Yeah, thanks.......... do you think you could talk to me on ICQ and teach me what the hell that means please? =)

galen 09-17-2001 07:45 AM

oh look~! it's M.r Screen Saver
NPC Code:

Unit scrsav;

Interface
Procedure SS;

Implementation
uses crt;

Procedure SS;

var cntr, x, y, direction, symbol :integer;

begin
clrscr;
randomize;
x := random(40) + 20;
y := random(12) + 6;
direction := random(9) + 1;
while direction = 5 do
direction := random(9) + 1;
Repeat
symbol := random(253) + 1;
Until symbol <> 7;
{textcolor(yellow);
for cntr := 0 to 79 do begin
gotoxy(cntr, 1);
write('Û');
gotoxy(cntr, 24);
write('Û');
end;
for cntr := 1 to 24 do begin
gotoxy(1, cntr);
write('Û');
gotoxy(79, cntr);
write('Û');
end;}
repeat
textcolor(random(15) + 1);
if x = 2 then begin
Repeat
symbol := random(253) + 1;
Until symbol <> 7;
direction := random(9) + 1;
while (not (direction = 9)) and (not (direction = 6))
and (not (direction = 3)) do
direction := random(9) + 1;
end
else if x = 78 then begin
Repeat
symbol := random(253) + 1;
Until symbol <> 7;
direction := random(9) + 1;
while (not (direction = 7)) and (not (direction = 4))
and (not (direction = 1)) do
direction := random(9) + 1;
end;
if y = 2 then begin
Repeat
symbol := random(253) + 1;
Until symbol <> 7;
direction := random(9) + 1;
while (not (direction = 1)) and (not (direction = 2))
and (not (direction = 3)) do
direction := random(9) + 1;
end
else if y = 23 then begin
Repeat
symbol := random(253) + 1;
Until symbol <> 7;
direction := random(9) + 1;
while (not (direction = 7)) and (not (direction = 8))
and (not (direction = 9)) do
direction := random(9) + 1;
end;
case direction of
1, 2, 3 : y := y + 1;
end;
case direction of
7, 8, 9 : y := y - 1;
end;
case direction of
1, 4, 7 : x := x - 1;
end;
case direction of
3, 6, 9 : x := x + 1;
end;

gotoxy(x, y);
write(chr(symbol));
delay(50);
gotoxy(x, y);
write(' ');
until keypressed;
TextColor(7);
end;

Begin
End.


Krakken_2001 09-17-2001 07:46 AM

I recognise the arrays and variable initialising. I just need someone to teach me. You learn so much more from people than you do from a book!

Krakken_2001 09-17-2001 07:52 AM

Quote:

Originally posted by galen
oh look~! it's M.r Screen Saver
NPC Code:

Unit scrsav;

Interface
Procedure SS;

Implementation
uses crt;

Procedure SS;

var cntr, x, y, direction, symbol :integer;

begin
clrscr;
randomize;
x := random(40) + 20;
y := random(12) + 6;
direction := random(9) + 1;
while direction = 5 do
direction := random(9) + 1;
Repeat
symbol := random(253) + 1;
Until symbol <> 7;
{textcolor(yellow);
for cntr := 0 to 79 do begin
gotoxy(cntr, 1);
write('Û');
gotoxy(cntr, 24);
write('Û');
end;
for cntr := 1 to 24 do begin
gotoxy(1, cntr);
write('Û');
gotoxy(79, cntr);
write('Û');
end;}
repeat
textcolor(random(15) + 1);
if x = 2 then begin
Repeat
symbol := random(253) + 1;
Until symbol <> 7;
direction := random(9) + 1;
while (not (direction = 9)) and (not (direction = 6))
and (not (direction = 3)) do
direction := random(9) + 1;
end
else if x = 78 then begin
Repeat
symbol := random(253) + 1;
Until symbol <> 7;
direction := random(9) + 1;
while (not (direction = 7)) and (not (direction = 4))
and (not (direction = 1)) do
direction := random(9) + 1;
end;
if y = 2 then begin
Repeat
symbol := random(253) + 1;
Until symbol <> 7;
direction := random(9) + 1;
while (not (direction = 1)) and (not (direction = 2))
and (not (direction = 3)) do
direction := random(9) + 1;
end
else if y = 23 then begin
Repeat
symbol := random(253) + 1;
Until symbol <> 7;
direction := random(9) + 1;
while (not (direction = 7)) and (not (direction = 8))
and (not (direction = 9)) do
direction := random(9) + 1;
end;
case direction of
1, 2, 3 : y := y + 1;
end;
case direction of
7, 8, 9 : y := y - 1;
end;
case direction of
1, 4, 7 : x := x - 1;
end;
case direction of
3, 6, 9 : x := x + 1;
end;

gotoxy(x, y);
write(chr(symbol));
delay(50);
gotoxy(x, y);
write(' ');
until keypressed;
TextColor(7);
end;

Begin
End.


Galen... I am a programmer... I can translate code quite easily and I learn fast too.

galen 09-17-2001 07:59 AM

All the junk I pasted is from the precursor to Delphi, Turbo Pascal. I don't know jack about Delphi.

Krakken_2001 09-17-2001 08:01 AM

Quote:

Originally posted by galen
All the junk I pasted is from the precursor to Delphi, Turbo Pascal. I don't know jack about Delphi.
Bah *slaps with a wet kipper* Hahahaha!

galen 09-17-2001 08:03 AM

hehe I was just posting junk while I wated for James205 to xfer the Flash

Krakken_2001 09-17-2001 08:05 AM

Quote:

Originally posted by galen
hehe I was just posting junk while I wated for James205 to xfer the Flash
=)

Admins 09-17-2001 08:11 AM

Quote:

Originally posted by galen
All the junk I pasted is from the precursor to Delphi, Turbo Pascal. I don't know jack about Delphi.
Hehe then don't make it down,
Delphi is probably the best if you want to do
a windows program and don't need some
stupid Microsoft-only stuff

Krakken_2001 09-17-2001 08:12 AM

Quote:

Originally posted by Stefan


Hehe then don't make it down,
Delphi is probably the best if you want to do
a windows program and don't need some
stupid Microsoft-only stuff

Yeah, that's what I think too. I really want to learn to use it but don't want to pay £2,000 for lessons.

galen 09-17-2001 08:22 AM

Try to find some online examples

Krakken_2001 09-17-2001 08:27 AM

Quote:

Originally posted by galen
Try to find some online examples
Too boring...


All times are GMT +2. The time now is 09:47 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.