Posts
 
Reputation
Joined
Last Seen
Ranked #903
Strength to Increase Rep
+3
Strength to Decrease Rep
-0
100% Quality Score
Upvotes Received
4
Posts with Upvotes
4
Upvoting Members
2
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
3 Commented Posts
~27.0K People Reached
Favorite Forums
Favorite Tags
Member Avatar for Scottie_uk

[QUOTE=needs_help;295235]in pascal, you have to predefine all your variable types, including array lengths, so you should already know the length.[/QUOTE] For most programs we need to write, this may be true. There are however many cases where we need to find the length of an array. An array can be …

Member Avatar for Smileydog
0
5K
Member Avatar for DelphiGuy

I managed to dig up useful code for this problem. I'll try to upload a file for this. I made everything using Delphi 9. Best regards.

Member Avatar for DelphiGuy
0
2K
Member Avatar for Morten Brendefu

Dear enlightened ones. First of all. I am using Delphi 9. My code compiles and run with no error at all, still I am confused about the structure window in the Delphi window. It tells me that I have redeclared some identifiers. The thing is that I have a few …

Member Avatar for pritaeas
0
920
Member Avatar for ebc3142

Although not writing this procedure for you, I can give you a few hints. First a tip :) you are working with the "old style" of data storing and reading. It could be better if you actually made a typed record of your needed information. Afterwards, easier to read or …

Member Avatar for Morten Brendefu
0
621
Member Avatar for redrobby02

I'll just give you a few more commands to play with :-) On a typed file, you just use the command FileSize(Type). It gives you the exact number of records in the file. :icon_exclaim: just remember that 0 is also a record. Now for the coding: [CODE] VAR TheStart, TheEnd:INTEGER; …

Member Avatar for Morten Brendefu
0
194
Member Avatar for AceStryker

That link was indeed a nice one for my personal purposes.:* However. As it goes, the hook is inserted in some Windows API. I am pretty sure that some viruses can access the keyboard directly via hardware. All in all, Windows API does just that too, and if you ask …

Member Avatar for Morten Brendefu
0
214
Member Avatar for Morten Brendefu

Dear knowledgeable ones. Some time ago I made a few of my routines kind of universal, and I wonder if there is any way in Delphi (My version is Delphi9) that can be used to reuse this code in example below. As you see, the two procedures are almost identical, …

Member Avatar for pritaeas
0
282
Member Avatar for Morten Brendefu

There are many places on internet for great help regarding many things. Proper implementation of really fast routines for sorting data however is not common. I am not claiming these routines to be the fastest around, but their ease of implementation and use may make them welcome. As a thank …

0
244
Member Avatar for Morten Brendefu

In my Delphi9, I have the ability to "Shrink" complete procedures and functions so that only the first line is visible. There is a small + or - at the beginning of first line of a routine, and when pressed, the code is 'minimized' or 'maximized'. I find this to …

Member Avatar for pritaeas
0
262
Member Avatar for mitster

Any radio button created belongs to the actual form it was created on. As long as the form is in the uses clause on other forms, then you can access its components and states. If you have a form named SETUP and a form named CODE, Then: CODE.RadioButton1 will access …

Member Avatar for Morten Brendefu
0
106
Member Avatar for Morten Brendefu

I am trying to write a few very dynamic procedures and functions and wonder about transferring parameters to a procedure as an Array. This is actually easy enough done.... just that I would like to pass something like [CODE] VAR a,b,c : INTEGER; Name, Text1,Text2 : STRING; todaysDate : TDate; …

Member Avatar for Morten Brendefu
0
1K
Member Avatar for redrobby02

The TDateTime is a Double Type. The fractional part handles the time only. [CODE] VAR td,t :TDateTime; BEGIN td=Now; // Both Time and Date in one double. t:=FRAC(td); // Variable t now holds Only the Time portion. IF t<0 THEN t:=t*-1 // If t is negative then make it positive. …

Member Avatar for Morten Brendefu
0
6K
Member Avatar for Morten Brendefu

Dear enlighted ones. I happen to try to finsh a kind of a function library that my Main program can utilize. As of now, Everything work great... but. I would like to implement some kind of error handling. The way I do this also work, but the error is generated …

Member Avatar for Morten Brendefu
0
582
Member Avatar for FlamingClaw

It works, but Binary sort approach is just sooooo much faster. This code is good enough though. It is easy to understand and easy to implement. Not so with a Binary sort approach or even the more complicated but ultimate speedy approach of Red/Black tree.

Member Avatar for Morten Brendefu
0
245
Member Avatar for seto.girl

Maybe I am missing something, but it is easy enough to have Delphi to write to a text file. Put a comma or semicolon between all columns on each row. Add a #13 (Carrier return) at end of row. Then start next row. Excel can easily import a comma or …

Member Avatar for Morten Brendefu
0
3K
Member Avatar for kundalish

[code] VAR a : ARRAY OF INTEGER; x : INTEGER; BEGIN SetLength(a,3); // This dynamically set the size of array to 3. a[0]:=1; a[1]:=2; a[2]:=3; // Now the given values are set. Now to resize. SetLength(a,6);// This resizes the array. x:=3; REPEAT a[x*2-1]:=a[x-1]; a[x*2-2]:=a[x-1]; DEC(x); UNTIL x=0; END. [/code] This …

Member Avatar for Morten Brendefu
0
155
Member Avatar for Morten Brendefu

I have tried searching internet a little bit and found some useful information about the command [CODE]SetLength[/CODE] I just wonder about a few things as I would like an array to "constantly" be redefined in size. When using it in one part of my program, it will be defined in …

Member Avatar for Morten Brendefu
0
137
Member Avatar for Morten Brendefu

Dear knowledgeable ones A new problem have arisen. I have now an SQL database file with about 100 tables in it. I would like to automatically go through all of these tables and check if the column "Owner" exist. If this field does not exist, then it should be created …

Member Avatar for Morten Brendefu
0
165
Member Avatar for Morten Brendefu

Dear knowledgeable ones. I started on a project to be able to use a smart card and a smart card reader in order to limit access to a program. I had some sample code written in Visual Basic, and wanted to translate this to Delphi instead, something I think I …

Member Avatar for pritaeas
0
800
Member Avatar for Morten Brendefu

I did an experiment regarding sorting of 256.000 random "names" using TListBox component. A friend of mine say that TListBox is faster than my code at sorting, so I wanted to test this out of curiosity. Method of testing. When I have created 256 thousand random textstrings, each 6 characters, …

Member Avatar for TrustyTony
0
2K
Member Avatar for Morten Brendefu

I am trying to draw a few items on a canvas using Canvas.TextOut mainly. My problem is that when I grab the form holding the canvas and then move the form outside of the screen and back again, all text and drawings have vanished, as if they have been erased. …

Member Avatar for Wolfgan
0
138
Member Avatar for Morten Brendefu

I am designing a lot of TCheckBox at runtime, and uses mathematical formulas for placing these in columns and rows afterwards on a form. I assign an on click event that is exactly the same on all of them, and everything work, except... Color. My OnClick event is made like …

Member Avatar for Wolfgan
0
2K
Member Avatar for Morten Brendefu

A "normal" Delphi snippet: [CODE]Procedure help_me1(Sender: TObject); BEGIN {100 lines of code} END; Procedure help_me2(Sender: TObject); BEGIN {100 lines of copy and paste code} END;[/CODE] [COLOR="Green"]How can I make this so that I end up with ONE procedure with 100 lines of code?[/COLOR] [CODE]Procedure much_reuseable_code(choice:BYTE); BEGIN {100 lines of code} …

Member Avatar for Morten Brendefu
0
191