352 Posted Topics
Re: login to a computer or login to a program with a password? | |
This small program shows that how we can arrange strings by alphabet in a vector.By FlamingClaw | |
Re: 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..... … | |
Re: what do you want to search?Any effort? | |
Re: 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 … | |
Re: 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 … | |
Re: What do you want?To log into a computer or just your program? | |
Re: [I] 10 = 9+1 10 = 8+2 10 = 7+3 [/I] Where do you want to search?Where do you store them,in string? | |
Re: [CODE=delphi] assign(hotSeat_file,'hotSeat.dat');{error here!!!} {need the whole path like 'C:\hotseat.dat'} [/CODE] | |
Re: 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? '); … | |
Re: [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 … | |
Re: 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 … | |
Re: "[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); … | |
Re: 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.... | |
Re: 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] | |
Re: What kind of dll is that?Or what is the name of that? | |
Re: 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; … | |
Re: i do not understand the question.... :'( what can we do for you? your program is working... what is the 'hotseat' game? | |
Re: [URL="http://www.devexpress.com/Products/NET/DXperience/WhatsNew2008v3/index.xml"]http://www.devexpress.com/Products/NET/DXperience/WhatsNew2008v3/index.xml[/URL] | |
Re: 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 … | |
Re: 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? | |
I want to show a simple example about writing record to a file,and for checking,read back from that file. Created By 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 | |
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 | |
Counts that how many propertied elements are in the array example:negative numbers By FlamingClaw | |
The Rule: s:=0; Loop i:=1 To N s:=s+T[i]; End of Loop; Out:s; By FlamingClaw | |
Prime or not?This little program will show prime numbers with green color from 0 to 100.By FlamingClaw; | |
I want to show you some rules about bit operating like Not,And,Or,Xor,Shl,Shr... By FlamingClaw | |
I've seen,there are guys that did not know,where to use a unit... See it just reference By 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 | |
This little calculator can +,-,/,*.Very simple,by FlamingClaw | |
We change the order of elements of a vektor Created by FlamingClaw | |
Often there is a case when we want to fill an array with record,and this program will demonstrate it... | |
| |
Many people says 'Don't use the GoTo statement,because your code will be unreadable....'.I say,can be use | |
Re: 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] | |
Re: 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; … | |
Re: 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] | |
Re: 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 … | |
Re: [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? | |
Re: 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. … | |
Re: try to unplug and then plug again your monitor's cable into your vga maybe this is the problem that your cable cracked | |
Re: just some questions ... 1,what is the rule? 2,precedence? "like club stronger then diamond...etc" 3,how many card can be dis? | |
Re: :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 … | |
Re: [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] | |
Re: [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 … |
The End.