352 Posted Topics

Member Avatar for josh48
Member Avatar for robso2
Member Avatar for FlamingClaw

This small program shows that how we can arrange strings by alphabet in a vector.By FlamingClaw

Member Avatar for sobari
0
1K
Member Avatar for revski

one form,two radio buttons as radiobutton1 and radiobutton2 and a simple button as button1,place them onto the form and code the button1 as [CODE=delphi] procedure TForm1.Button1Click(Sender: TObject); begin if radiobutton1.Checked = true then begin radiobutton2.Checked:=false; showmessage('radiobutton1 is selected'); end else begin showmessage('radiobutton2 is selected'); end; end; [/CODE] this is it..... …

Member Avatar for revski
0
260
Member Avatar for Vdub.za
Member Avatar for prefer

I tryed to compile your unit,same problem like you,mine is delphi 7. The case statement is waiting for an ordinal type as char or integer,or byte or boolean etc and you add a real type...it is the problem :'( One of alternative is to round to integer,look at the modified …

Member Avatar for House_of_Dexter
-1
257
Member Avatar for havoc433

what if we use some procedure and function..? [CODE=pascal] PROGRAM LinkedList; USES Crt; TYPE DataType = string; NodePtr = ^ NodeType; NodeType = RECORD Data : DataType; Count:INTEGER; Next : NodePtr; END; VAR Head, Temp : NodePtr; input : string; i : integer; position:integer; cut :string; { add at end …

Member Avatar for FlamingClaw
-1
287
Member Avatar for Jayno4
Member Avatar for FlamingClaw
-1
216
Member Avatar for marygreen

[I] 10 = 9+1 10 = 8+2 10 = 7+3 [/I] Where do you want to search?Where do you store them,in string?

Member Avatar for marygreen
-1
116
Member Avatar for turbomen

[CODE=delphi] assign(hotSeat_file,'hotSeat.dat');{error here!!!} {need the whole path like 'C:\hotseat.dat'} [/CODE]

Member Avatar for FlamingClaw
-1
123
Member Avatar for Kirky89

Hi Kirky89. the answer is simple,just listen my(your) code :D [CODE=delphi] program lab12exc3; {$APPTYPE CONSOLE} uses SysUtils{ourcrt}; var length,width,height,area,litresPaint,metresPaint : real; procedure input_measurements; begin write('What is the length of the room? '); readln(length); writeln('What is the width of the room? '); readln(width); writeln('What is the height of the room? '); …

Member Avatar for FlamingClaw
-1
124
Member Avatar for turbomen

[CODE=delphi] { First I created a new file,cause yours is not proper to me,sorry And I write 5 members into it,and then read them into an array and last short them by the way,there are lot of shorting algorithm,I show you one of them simple sample: (*pascal but it is …

Member Avatar for FlamingClaw
-1
136
Member Avatar for TomRandall

What if the added parameter type is not meet properly? Listen,if you create a new type as array and pass it to the proc... [CODE=delphi] program array1___; {$APPTYPE CONSOLE} uses SysUtils; type TArray = array[1..5]of integer; const numbers:TArray = (10,20,30,40,50); procedure example(const nums: TArray); begin WriteLn(nums[5]); end; begin Writeln(numbers[5]);{result is …

Member Avatar for FlamingClaw
-1
180
Member Avatar for marygreen

"[I]The loop is very slow. To generate 2,000,000 lines it needs 2:45 hours. As it continues, it gets slower and slower still.[/I]" I wrote a same program like yours..... what if you leave out floattostr function from the loop? button1 coded: [CODE=delphi] procedure TForm1.Button1Click(Sender: TObject); var i:integer; s:string; begin s:=floattostr(3.14); …

Member Avatar for jng
-1
107
Member Avatar for turbomen

first you have to know the record's field,if you know then you can use a for loop to write the guy to the file.... By the way,when we want to write records into a file then we do it with typed file,same typed as the record....

Member Avatar for House_of_Dexter
-1
182
Member Avatar for Levike

I found a little program that converts c to delphi [URL="http://www.sharewareconnection.com/c-2-delphi-converter.htm"]http://www.sharewareconnection.com/c-2-delphi-converter.htm[/URL]

Member Avatar for House_of_Dexter
-1
224
Member Avatar for johnng815
Member Avatar for House_of_Dexter
-1
128
Member Avatar for yozuca

you can use records to store the members data like my code [code=pascal] { The DATA: 20081231 Betty 03/09/1978 The programm } program solution; type Tmember = record id:longint; name:string; day:1..31; month:1..12; year:1900..3000; end; var infile:file of Tmember; infilename:string; someone:Tmember; searching:boolean; idn:longint; begin infilename:='C:\myfile.dat'; write('Member ID > '); readln(idn); searching:=false; …

Member Avatar for FlamingClaw
-1
164
Member Avatar for turbomen

i do not understand the question.... :'( what can we do for you? your program is working... what is the 'hotseat' game?

Member Avatar for turbomen
0
241
Member Avatar for daviscooper

[URL="http://www.devexpress.com/Products/NET/DXperience/WhatsNew2008v3/index.xml"]http://www.devexpress.com/Products/NET/DXperience/WhatsNew2008v3/index.xml[/URL]

Member Avatar for FlamingClaw
0
78
Member Avatar for turbomen

Hi Turbomen :D If you want to create a console application then this is also a solution [code=delphi] Program EvenOrNot; {$APPTYPE CONSOLE} Uses SysUtils; Var i,counter:LongInt; TheOdds:Boolean; {true or false} Begin i:=2; counter:=0; Write('The even numbers are: '); While i<=21 Do Begin TheOdds:=Odd(i); If (TheOdds=False) Then Begin Write(i,' '); counter:=counter+i;{increase …

Member Avatar for EdFallon
0
229
Member Avatar for especta

so the word.txt's contets need to change? like hello,10 welcme,20 text,30 or the two files' contents number.txt's contents: 10,hello 20,welcme 30,text ...... word.txt's contents: 10 20 30 what do you say?

Member Avatar for especta
0
221
Member Avatar for FlamingClaw

I want to show a simple example about writing record to a file,and for checking,read back from that file. Created By FlamingClaw

0
258
Member Avatar for FlamingClaw

This algorithm will add the searched element's place in an array This works only when there is so element what we're searching for. By FlamingClaw

0
155
Member Avatar for FlamingClaw

This algorithm will decide that is there a serched element in the array.If it finds one then the loop halts.If the loop halts cause we're stepping over the last element of the array then there is not searched element. By FlamingClaw

0
2K
Member Avatar for FlamingClaw

Counts that how many propertied elements are in the array example:negative numbers By FlamingClaw

0
176
Member Avatar for FlamingClaw
0
802
Member Avatar for FlamingClaw

Prime or not?This little program will show prime numbers with green color from 0 to 100.By FlamingClaw;

0
293
Member Avatar for FlamingClaw

I want to show you some rules about bit operating like Not,And,Or,Xor,Shl,Shr... By FlamingClaw

0
199
Member Avatar for FlamingClaw

I've seen,there are guys that did not know,where to use a unit... See it just reference By FlamingClaw

0
783
Member Avatar for FlamingClaw

This little program a solution for putting a string into an array. The method is that the string is divided for chars.... By FlamingClaw

0
214
Member Avatar for FlamingClaw
0
199
Member Avatar for FlamingClaw
0
974
Member Avatar for FlamingClaw

Often there is a case when we want to fill an array with record,and this program will demonstrate it...

0
217
Member Avatar for FlamingClaw
Member Avatar for FlamingClaw
Member Avatar for FlamingClaw

Many people says 'Don't use the GoTo statement,because your code will be unreadable....'.I say,can be use

Member Avatar for FlamingClaw
0
1K
Member Avatar for FlamingClaw
Member Avatar for FlamingClaw
Member Avatar for revski

here you can find some information about this problem [URL="http://coding.derkeiler.com/Archive/Delphi/borland.public.delphi.nativeapi/2004-01/0465.html"]http://coding.derkeiler.com/Archive/Delphi/borland.public.delphi.nativeapi/2004-01/0465.html[/URL]

Member Avatar for FlamingClaw
0
115
Member Avatar for turbomen

i had a little time to continue the card game.... [code=pascal] program solution; var lapok:array[1..12]of string[1];{the cards,2,3,4,5...J,Q,K,A} kezd:byte;{who begins the game} lapszam:byte;{the numbers of the card } i,num:byte; s:string[1]; you,computer,draw:byte; lapyou,lapcomputer:array[1..4]of string[1]; temp:byte; procedure stars; var x:byte; begin writeln; for x:=1 to 20 do write('*-'); writeln; end; begin lapszam:=52; you:=0; …

Member Avatar for FlamingClaw
0
163
Member Avatar for Roger99

try this link [URL="http://www.devexpress.com/Products/NET/Controls/WinForms/Editors/Editors/MemoExEdit.xml"]http://www.devexpress.com/Products/NET/Controls/WinForms/Editors/Editors/MemoExEdit.xml[/URL]

Member Avatar for Roger99
0
84
Member Avatar for turbomen

1, The computer get value randomly... Do you want to get your choice randomly too? 2, "[I]..and finally there is a record of the comparison XX : XX....[/I]" the answer is very simple... add two variables to the definition section[code=pascal] VAR numyou,numcomputer:Integer;{like these..} Count, Num, Computer : integer; Choice, compChar …

Member Avatar for turbomen
0
110
Member Avatar for FearlessFourie

[QUOTE=Nathan Campos;958121]Remove the [icode][ ][/icode] from the string method, like this: [code=pascal]Verse : array[1..6] of string;[/code][/QUOTE] I'm just do not understand that why need to delete the [B][[/B] and the [B]] [/B]? :'( cause a [B]string's[/B] max length is 255 char,or not?

Member Avatar for FearlessFourie
0
155
Member Avatar for turbomen

I tryed to explain everything..... [code=pascal] program solution; var choice:Integer;{the user choice} { let's create the 5 procedures these procedures does nothing,only called by the main program... } {0,} procedure task_zero; begin writeln('0. procedure is exiting from the main program...'); writeln('press enter to continue...'); end; {1,} procedure task_one; begin writeln('1. …

Member Avatar for FlamingClaw
0
118
Member Avatar for ocean2870

try to unplug and then plug again your monitor's cable into your vga maybe this is the problem that your cable cracked

Member Avatar for PcTestCard.com
0
160
Member Avatar for turbomen

just some questions ... 1,what is the rule? 2,precedence? "like club stronger then diamond...etc" 3,how many card can be dis?

Member Avatar for FlamingClaw
0
106
Member Avatar for amazing_grace

:D your first program working properly!I run your code and it is worked perfectly....(of course mine is Turbo Pascal 7.0 and dev pascal 1.9.2) listen your code: :-/ [code=pascal] for i:= 1 to 2 do write(f, data[i]); [/code] there are two rounds so this code write two records to this …

Member Avatar for Duoas
0
350
Member Avatar for especta

[code=delphi] procedure TForm1.Button1Click(Sender: TObject); var result:Integer; s:string; {!} function linecount(filename: string): integer; var f: textfile; begin assignfile(f,filename); reset(f); result:= 0; while not eof(f) do begin readln(f); inc(result); end; closefile(f); linecount:=result; {!} end; begin memo1.Clear; {!} Str(linecount('C:\sample.txt'),s); {!} memo1.Lines.Add(s); {!} end; [/code]

Member Avatar for especta
0
3K
Member Avatar for turbomen

[code=pascal] program solution; {A positive integer is entered from the keyboard. so we need 3 vars user is your choice,i is a loop var, sum contains the sum of the odd numbers,so..} var user,i,sum:integer; begin sum:=0; write('give me a positive integer number: '); readln(user); if (odd(user)=true)then begin{if user is an …

Member Avatar for FlamingClaw
0
167

The End.