Forum: Pascal and Delphi Apr 7th, 2009 |
| Replies: 4 Views: 559 Before worrying about putting it all together, work on the parts of the program. For instance, you have identified the record to store your data, but how are you loading user input into the record... |
Forum: Pascal and Delphi Apr 7th, 2009 |
| Replies: 6 Views: 844 FlamingClaw's example is for using an editbox in a Form application. Are you creating a form or are you doing a consule application? |
Forum: Pascal and Delphi Mar 31st, 2009 |
| Replies: 1 Views: 316 EXE files are compiled. The code has been removed and replaced by an instruction that operates the computer. You must get a copy of your friend's uncompiled code to review or change it. |
Forum: Pascal and Delphi Mar 30th, 2009 |
| Replies: 9 Views: 1,900 FlamingClaw,
My bad, you are right.
However, overiding the automatic increment still looks like a bad practice. |
Forum: Pascal and Delphi Mar 30th, 2009 |
| Replies: 9 Views: 1,900 FlamingClaw,
Two thoughts on your example:
1.) i := i + 9; // does not increment by 10
2.) Using the For statement could easily lead to an error in a large body of code. Imagine coming back... |
Forum: Pascal and Delphi Mar 25th, 2009 |
| Replies: 5 Views: 620 The compiler reads and translates the code you write. All names etc are dropped so if there is a way to read the compiled code and identify the logic, it would still not have any names or other... |
Forum: Pascal and Delphi Mar 24th, 2009 |
| Replies: 5 Views: 351 It looks like only a few lines actually change. Why don't you put the graphic in a loop with the few lines that change as a separate method? You can use counters to keep track of when to begin or... |
Forum: Pascal and Delphi Mar 19th, 2009 |
| Replies: 5 Views: 466 Another possibility would be to create a small database structure and placing the items in a database file. IF you have not explored database managment in Delphi yet, then this would be a good... |
Forum: Pascal and Delphi Mar 18th, 2009 |
| Replies: 6 Views: 862 There are a number of conversion functions the sysutils.pas unit that can test this for you and check out extractstrings in the Classes unit for a basic parsing function. |
Forum: Pascal and Delphi Mar 15th, 2009 |
| Replies: 10 Views: 909 Now that you have a program that works, consider this: One goal for writing code is to avoid duplication. Note that you have the same code repeating for each case (H or T). You might want to look... |
Forum: Pascal and Delphi Mar 12th, 2009 |
| Replies: 6 Views: 3,115 FlamingClaw,
You could also use "absolute" to align the two variables in memory by declaring:
Var
S : string;
B : Array of Byte Absolute S;
This allows you to read and write to the... |
Forum: Pascal and Delphi Mar 11th, 2009 |
| Replies: 6 Views: 3,115 IS "formvar" part of Delphi or your own method? I could not find a reference for it and am not familiar with it. Either way, what is the declaration for the function? Have you looked at... |
Forum: Pascal and Delphi Mar 2nd, 2009 |
| Replies: 10 Views: 909 What is the purpose of the integers Head and tail? Are they needed? Look at how you are using them and follow the value of Flip1 using debug monitors. |
Forum: Pascal and Delphi Feb 27th, 2009 |
| Replies: 3 Views: 1,481 Take a look at Sysutils.pas. There a number of date/time methods that manage date operations. |
Forum: Pascal and Delphi Feb 24th, 2009 |
| Replies: 6 Views: 1,002 Your problem here is clearly the algorithm, not the coding. Do you actually need Dijkstra's algorithm?
If you take all the points and determine the average Y value and then split the list of... |
Forum: Pascal and Delphi Feb 23rd, 2009 |
| Replies: 0 Views: 958 I just ran across some code that declares a complex packed record:
aSInt = Integer;
entity = packed Record
Enttype : byte;
field2 : double;
... //continues with other standard... |
Forum: Pascal and Delphi Feb 23rd, 2009 |
| Replies: 1 Views: 431 Have you tested this? What happens? What help are you looking for? |
Forum: Pascal and Delphi Feb 23rd, 2009 |
| Replies: 6 Views: 1,002 To save LizR the effort let me ask you:
What have got thus far? Have you developed any parts of the algorithm such as how to read the file, how to store the data for use, or how to determine the... |
Forum: Pascal and Delphi Feb 16th, 2009 |
| Replies: 4 Views: 964 Thanks sknake!
No it doesn't fit my needs, but it is another interesting idea. The problem with CAD files is that they are not standard databases. There are too many variable types to define... |
Forum: Pascal and Delphi Feb 11th, 2009 |
| Replies: 4 Views: 964 Thanks, I realized my error, but on the way I also discovered the use of "absolute" to align the memory of two types. I am self educated which means there are often little holes in my bigger... |
Forum: Pascal and Delphi Feb 10th, 2009 |
| Replies: 4 Views: 964 I am working on a project for a Cad program in which I must embed data in the Cad file. The tools for doing so in the cad program allow for embedding boolean, integer, double byte and string values,... |
Forum: Pascal and Delphi Jan 13th, 2009 |
| Replies: 4 Views: 1,490 Thanks.
This worked great with the DBGrid. When I tried using a DBEdit, i have trouble getting it to connect to a specific field (eg Name). I assume I connect the edit component to a field using... |
Forum: Pascal and Delphi Jan 13th, 2009 |
| Replies: 4 Views: 1,490 I am trying to use a clientdataset without an associated Table. I am attempting to extract and edit data from a Cad program. The Cad program has an interface in which the user selects specific... |
Forum: Pascal and Delphi Jan 9th, 2009 |
| Replies: 9 Views: 1,021 |
Forum: Pascal and Delphi Jan 9th, 2009 |
| Replies: 9 Views: 1,021 If you look in the directories where your Delphi program is located on your computer under the ...source/win32/rtl/sys directory you will find the file sysutils.pas. This file contains a number of... |
Forum: Pascal and Delphi Jan 9th, 2009 |
| Replies: 9 Views: 1,021 The unit sysUtil.pas has a number of string routines including several that can be used to search through the string to find the spaces between words and allow you to extract the words individually... |
Forum: Pascal and Delphi Jan 6th, 2009 |
| Replies: 11 Views: 1,001 your array is "a" with 1 through 7 as the items. You addressed it correctly in the readln (a[i]) To test element three you would use a [3] or a [i] for a variable in a loop.
if (a[i] < 1) or... |
Forum: Pascal and Delphi Dec 18th, 2008 |
| Replies: 5 Views: 894 Darkyere,
Check out this site:
http://blogs.codegear.com/nickhodges/2006/08/15/26687
These demonstration files are excellent tutorials for beginners on many features of Delphi including... |
Forum: Pascal and Delphi Dec 11th, 2008 |
| Replies: 7 Views: 1,097 I am not certain I understand what you are asking. That is to say what level of experience you have with programming in general. You mention using DB related compnenets, but it is not clear if you... |
Forum: Pascal and Delphi Dec 2nd, 2008 |
| Replies: 1 Views: 1,056 It only checks the matching subscript numbers because that is what you have told it to do. IF you want to compare each number in "user" with each number in "number" you must set up a second for loop... |
Forum: Pascal and Delphi Nov 21st, 2008 |
| Replies: 4 Views: 615 Delphi is based on Object Pascal (OP). It includes an IDE allowing visual programming using OP. The IDE environment includes many predefined classes, with source code, that both create the... |
Forum: Pascal and Delphi Nov 20th, 2008 |
| Replies: 4 Views: 615 MAny are avilable including a lot of third party products, some cost, some are free. Start your search at Codegear and look at the product information or google delphi datases. Your choice will... |
Forum: Pascal and Delphi Nov 20th, 2008 |
| Replies: 2 Views: 561 You might want to skip the while loop and try:
If listview2.findcaption (1,inttostr(randomnr)), false, true, true)=nil Then //no match found
ALso check the parameters to see if they are correct |
Forum: Pascal and Delphi Nov 16th, 2008 |
| Replies: 5 Views: 566 Have you traced the logic using debug and monitored the values for the local variables at each step? I am not sure what is not working when you press the button. If the first two buttons no longer... |
Forum: Pascal and Delphi Nov 14th, 2008 |
| Replies: 5 Views: 566 The code that reacts to pressing the buttons is not included here. Can you show an onclick event code for a button? The anser to uyour problem probalby is in the detail for how you are handling... |
Forum: Pascal and Delphi Nov 13th, 2008 |
| Replies: 22 Views: 5,561 I have a question for LizR here. I have read and written into Excel spreadsheets using an ADO table and Clientdataset setup. It is my thinking that this would note require Excel to work with the... |
Forum: Pascal and Delphi Oct 14th, 2008 |
| Replies: 12 Views: 1,631 I'm not sure of your intent. I visualize three compnents on the form, the list box with the user names, and two text boxes, one for names and one for passwords. IF you have a listbox that has read... |
Forum: Pascal and Delphi Oct 14th, 2008 |
| Replies: 17 Views: 2,309 A Stringlist is a class of Tstring. It contains a list of strings that can be accessed and managed through the various methods (add, delete, find etc..) It also allows you to separate each string... |
Forum: Pascal and Delphi Sep 8th, 2008 |
| Replies: 6 Views: 1,400 TP = Turbo Pascal Software |
Forum: Pascal and Delphi Aug 15th, 2008 |
| Replies: 1 Views: 668 This question is too vague to answer. Can you be more specific about what you did three years ago and what you want to do now. Are you trying to modify code or are you trying to duplicate what is... |