Forum: Pascal and Delphi Aug 23rd, 2009 |
| Replies: 4 Views: 619 It is because you have misunderstood something.
A string is not a simple POD type -- it is an object type -- which you cannot write directly to file (according to Delphi standards [and also ISO... |
Forum: Pascal and Delphi Aug 4th, 2009 |
| Replies: 12 Views: 947 johnyjj2 if you really want help, please post your code.
What you've listed so far is nonsense. |
Forum: Pascal and Delphi Aug 3rd, 2009 |
| Replies: 12 Views: 947 Whitespace between the keyword end and the period is not significant.
Perhaps you should post more code? It is hard to diagnose what is wrong.
With FPC, you must be sure to have the {$goto on}... |
Forum: Pascal and Delphi Aug 2nd, 2009 |
| Replies: 14 Views: 2,552 Unfortunately I never did have much time to sink into it, so I never did figure out what caused it. I still think it has to do with memory paging or something...
I just optimized the tar out of... |
Forum: Pascal and Delphi Jul 16th, 2009 |
| Replies: 1 Views: 430 It is easy enough with the mouse events.
The MouseMove event handler should do something like the following pseudocode:
procedure TFooey.MouseMove( ... );
begin
if (nothing prevents you... |
Forum: Pascal and Delphi Jul 16th, 2009 |
| Replies: 10 Views: 3,489 Unfortunately, there really isn't a very amazing way to do directory browsing natively.
That aside, there is also useful information like this:
Centering the Select Directory dialog... |
Forum: Pascal and Delphi Jul 16th, 2009 |
| Replies: 1 Views: 644 You are looking at the form resource data. Essentially, when the original program was written (in Delphi), the programmer used a TImage component in the forms designer, double clicked the Picture... |
Forum: Pascal and Delphi Jul 15th, 2009 |
| Replies: 5 Views: 527 No, it isn't solved. Wait until it is. ;-) |
Forum: Pascal and Delphi Jul 15th, 2009 |
| Replies: 2 Views: 413 Eh, why not?
uses SysUtils, Windows;
procedure TypeStr( lpszString: pChar );
var
cChar: char;
vk: word;
begin |
Forum: Pascal and Delphi Jul 13th, 2009 |
| Replies: 5 Views: 527 According to the Delphi documentation, the TScreen.Fonts only lists "screen" fonts. You may want to also check in TPrinter.Fonts, as the font you want is technically for use with the printer...
... |
Forum: Pascal and Delphi Jul 11th, 2009 |
| Replies: 5 Views: 637 The .DFM file is linked into the executable as an RCDATA resource, which is just a compressed text version of the .DFM file (a few versions of Delphi save the DFM in compressed format, but most do... |
Forum: Pascal and Delphi Jul 6th, 2009 |
| Replies: 5 Views: 782 What are you writing? An OS?
We're not a translation service. You may want to try the Looking to Hire (http://www.daniweb.com/forums/forum72.html) forum. |
Forum: Pascal and Delphi Apr 3rd, 2009 |
| Replies: 2 Views: 676 In Pascal, a semicolon separates statements (and terminates directives).
So the following is correct:
program Hello; { Semicolon terminates directive }
begin
writeln( 'Hello world!' ) {... |
Forum: Pascal and Delphi Apr 1st, 2009 |
| Replies: 9 Views: 1,460 BP variants don't accept binary numbers.
Assemblers accept binary numbers.
Since Delphi has a built-in assembler, you can use binary numbers with the assembler -- but not in the normal Pascal code.... |
Forum: Pascal and Delphi Mar 25th, 2009 |
| Replies: 5 Views: 637 Alas, you have little to look forward to. Unless you must decompile or reverse-engineer, you are typically better-off just rewriting the thing.
If undaunted, check out this About.com article about... |
Forum: Pascal and Delphi Nov 20th, 2008 |
| Replies: 9 Views: 1,204 Hmm, you are right. My TP4 and TP5.5 both barf on both @x and addr(x).
This is one of those (relatively few) things that Borland did wrong (stunting the language). Alas. The only to make things... |
Forum: Pascal and Delphi Nov 16th, 2008 |
| Replies: 4 Views: 2,041 I don't know how you have your script set up, but the [Tasks] and [Components] sections are specifically designed for this. Every "task" you list in the tasks section indicates some component to... |
Forum: Pascal and Delphi Nov 16th, 2008 |
| Replies: 9 Views: 1,204 It isn't a bug. Free Pascal is a little more strict about certain things than TP.
Your program should read:
program fred;
type funcparam=function(x:real):real;
function jim(x:real):real;
... |
Forum: Pascal and Delphi Sep 24th, 2008 |
| Replies: 2 Views: 794 Use Google Translate (http://translate.google.com/translate_t#). |
Forum: Pascal and Delphi Sep 23rd, 2008 |
| Replies: 1 Views: 1,763 You'll need to create a system snapshot and walk the processes and modules.
MSDN Tool Help Library (http://msdn.microsoft.com/en-us/library/ms686837(VS.85).aspx)
If you don't need to do it... |
Forum: Pascal and Delphi Sep 20th, 2008 |
| Replies: 12 Views: 4,179 Sorry I was grouchy. :$ :) |
Forum: Pascal and Delphi Sep 19th, 2008 |
| Replies: 12 Views: 4,179 Isn't that what I suggested in #4? |
Forum: Pascal and Delphi Sep 14th, 2008 |
| Replies: 1 Views: 829 What exactly do you mean by "columns"? The same as in your code?
If so, perhaps it would help to stare at the cute animation over at Wikipedia: Pascal's Triangle... |
Forum: Pascal and Delphi Sep 14th, 2008 |
| Replies: 6 Views: 1,927 Unfortunately, Delphi really doesn't have very good support for Unicode. Widestrings really only exist for compatabilty with OLE objects...
Lately I've been learning a lot about using Unicode in... |
Forum: Pascal and Delphi Sep 12th, 2008 |
| Replies: 12 Views: 4,179 You'll need an index or pointer to the last character in the string, and an index or pointer to the first character in the string, and a temporary char. Then swap values, dec( last ), inc( first )... |
Forum: Pascal and Delphi Sep 6th, 2008 |
| Replies: 6 Views: 1,413 What version of TP are you using? My TP4 wouldn't get past the 8+ letter filename.
First, you are forbidden to use reserved words as identifiers. That means unit and in are off-limits.
You must... |
Forum: Pascal and Delphi Sep 6th, 2008 |
| Replies: 6 Views: 1,177 An exception is a way of handling runtime errors (like stack overflow or page faults). Read more here:
http://www.freepascal.org/docs-html/ref/refch14.html#x167-17400014
Enjoy! |
Forum: Pascal and Delphi Sep 3rd, 2008 |
| Replies: 6 Views: 1,177 FPC will generate exceptions for them. Check FPC's documentation for runtime errors.
Good luck! |
Forum: Pascal and Delphi Sep 1st, 2008 |
| Replies: 3 Views: 1,237 Argh, I couldn't find a simple example on the web. So, without further ado:
hello.dpr
program hello;
{$apptype console}
uses greet;
var
index: cardinal; |
Forum: Pascal and Delphi Aug 29th, 2008 |
| Replies: 2 Views: 768 Its full path is given as the first command-line argument. So you will want to add code to check to see if an mp3 file was supplied and autoplay it. How exactly you do it is up to you, but I... |
Forum: Pascal and Delphi Aug 28th, 2008 |
| Replies: 8 Views: 2,118 > Maybe even scan the image and set the region pixel by pixel, so we will have a long list of vectorial "lines".
That is actually non-trivial to implement. But there do exist algorithms to do it. I... |
Forum: Pascal and Delphi Aug 27th, 2008 |
| Replies: 8 Views: 2,118 I think I understand. You want the actual button itself to have the same shape as the polygon?
You'll have to create a region and assign it to your button.
See the MS Regions documentation... |
Forum: Pascal and Delphi Aug 26th, 2008 |
| Replies: 8 Views: 2,118 Take a look in the documentation for the TCanvas.Pixels property. (Your button has a canvas). Also look at the OnMouseDown event. |
Forum: Pascal and Delphi Aug 26th, 2008 |
| Replies: 6 Views: 1,177 That depends entirely on the OS and the compiler vendor.
I'm pretty sure that old Turbo Pascals will properly crash if you try to overflow the heap. Delphi will raise an exception. For other... |
Forum: Pascal and Delphi Aug 21st, 2008 |
| Replies: 1 Views: 1,284 Dynamic or static linkage?
You should probably spend some time looking through your Delphi documentation's "Components and Packages" section.
Your package must register the component (the... |
Forum: Pascal and Delphi Aug 21st, 2008 |
| Replies: 8 Views: 2,118 If you are going to be using buttons with pixel images (like a GIF) you will need to do pixel-hit testing yourself.
Use the OnMouseDown event's X and Y values (which are relative to the button) to... |
Forum: Pascal and Delphi Aug 16th, 2008 |
| Replies: 3 Views: 1,226 It is complaining because readln is not a constant expression that matches the case type (n is an integer), and then it is complaining that it found a semicolon after the readln() instead of a colon,... |
Forum: Pascal and Delphi Aug 15th, 2008 |
| Replies: 3 Views: 1,226 Please use tags.
It looks like you are off to a fairly good start, but you are missing a couple things.
Remember, in Pascal multiple statements must be enclosed in a begin..end block.
... |
Forum: Pascal and Delphi Aug 15th, 2008 |
| Replies: 1 Views: 1,533 Use a commercial library. It is worth the $$.
There are also some good free ones.
DTK Software (http://www.dtksoft.com/barreader.php)
Zebra Barcode Library... |
Forum: Pascal and Delphi Aug 15th, 2008 |
| Replies: 14 Views: 2,552 I'm afraid not.
I've been running the DAEMON Tools Lite (http://www.daemon-tools.cc/) CD/DVD emulator and I noticed that it ran full-speed when running the ISO from the emulator.
My current... |