Re: [fpc-pascal] Preprocessor
On 04 Dec 2009, at 21:37, ik wrote: > Is there a way to see a preprocessor of what fpc creates rather then the > assembly code so I could see how defines and ifdefs executes (when compiling > rtl) ? No, but you can compile with -vc and then the compiler will print for each conditional whether it accepts or rejects it. Jonas___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Preprocessor
Hello, Is there a way to see a preprocessor of what fpc creates rather then the assembly code so I could see how defines and ifdefs executes (when compiling rtl) ? Thanks Ido http://ik.homelinux.org/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Setlength
On 04 Dec 2009, at 17:03, Flávio Etrusco wrote: On Fri, Dec 4, 2009 at 12:32 PM, Jonas Maebe > wrote: On 04 Dec 2009, at 14:57, Carsten Bager wrote: I have 2 lines of code 1 I allocate memory 2 I read from the screen (Nano-X) and save it in the "BitMapArray". Can I do this or can I not be sure that the memory is in one block. I have no idea whether that is guaranteed. It is currently implemented in that way, but I don't know whether that is an implementation detail or guaranteed behaviour. By "in one block" does he mean "contiguous user-space addresses"? If so, I don't understand your answer. How would a non-contiguous allocation work? There are many implementations of dynamic array-like structures that externally behave like an array, but which internally divide the array over multiple allocations. The reason is that contiguous virtual memory space is not infinite either, especially not in 32 applications. Indexing is then internally performed using 2 (first select the subarray, then the element) or more steps. Jonas___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Setlength
On 04 Dec 2009, at 14:57, Carsten Bager wrote: I have 2 lines of code 1 I allocate memory 2 I read from the screen (Nano-X) and save it in the "BitMapArray". Can I do this or can I not be sure that the memory is in one block. I have no idea whether that is guaranteed. It is currently implemented in that way, but I don't know whether that is an implementation detail or guaranteed behaviour. Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Setlength
I have 2 lines of code 1 I allocate memory 2 I read from the screen (Nano-X) and save it in the "BitMapArray". Can I do this or can I not be sure that the memory is in one block. setlength(BitMapArray,Width*Height); GrReadArea(TNxWindow(window).w,Left,Top,Width,Height,@BitMapArray[0]); Carsten ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] can the output object filename be specified on the command line?
On 04 Dec 2009, at 05:02, Bruce Bauman wrote: Will it cause problems if the unit name (e.g. unit foo__bar;) doesn't match the source filename? I want to source filename to remain unchanged (e.g. bar.pas), but the unit name (and .ppu and .o filenames) to be different (e.g. foo__bar.o, foo__bar.ppu, unit foo__bar). Thus, the .ppu files are named the same as the object file and unit, but different from the source filename. We are porting a large body of existing code and don't want to rename all of the source files if we can avoid it. You can use the -Un command line option, in which case the compiler will not check that the unit name matches the source file name. In this case, you have to explicitly mention the source file name every time you use this unit though, since otherwise the compiler won't be able to find it. See e.g. http://svn.freepascal.org/svn/fpc/trunk/tests/webtbs/tw1279.pp and http://svn.freepascal.org/svn/fpc/trunk/tests/webtbs/uw1279.pp Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal