Oh, I just remembered--I had a similar problem with CMake, where for
everyone else the installer successfully modified PATH, but not on my
machine.
I use a lot of command line programs, all installed in different
directories, so my PATH was too long for the CMake installer to modify.
There was a C
>
> Well, I just checked:
>
> http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/install/fpc.ist?view=annotate&root=fpcbuild
> around line 253 and further.
>
> It matches my experience.
>
> Maybe you are using Windows ME or older windows versions.
I am using Windows 7 Professional x64. Which vers
>
> It did work perfectly on my Win7 laptop.
> You might want to have"administrator privileges whilst installing
> (IIRC modifying the global PATH variable requires administrator
> privileges).
I do have administrator privileges, and the installer could be built to
modify the user's PATH variable
aller<http://www.advancedinstaller.com/>is decent at creating
installers that correctly modify the PATH variable.
Cheers,
Andrew Pennebaker
www.yellosoft.us
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Jonas: Thanks, I'll use fpc -iV from now on.
But "make install" still puts an fpc binary in /usr/local/bin that reports
"2.7.1" and then overwrites *something* so that a second fpc call reports
"2.4.4".
Cheers,
Andrew Pennebaker
www.yellosoft.us
On Mon, O
t;.
Cheers,
Andrew Pennebaker
www.yellosoft.us
On Mon, Oct 31, 2011 at 6:09 AM, Jonas Maebe wrote:
>
> On 31 Oct 2011, at 08:36, Andrew Pennebaker wrote:
>
> > I forcibly sudo cp ppc386 /usr/local/bin/fpc, mitigating the issue. Yeah,
> > something in the makefile installati
Error: Generics without specialization cannot be used as
a type for a variable
paycheck.pas(6,25) Fatal: Syntax error, ";" expected but "<" found
Fatal: Compilation aborted
Cheers,
Andrew Pennebaker
www.yellosoft.us
On Fri, Oct 21, 2011 at 9:47 AM, Sven Barth wrote:
&g
I forcibly sudo cp ppc386 /usr/local/bin/fpc, mitigating the issue. Yeah,
something in the makefile installation process is definitely moving over an
older version. (I deleted the whole directory for the v2.4.4 subversion, so
that's not the problem.)
Cheers,
Andrew Pennebaker
www.yelloso
hes installing, I run fpc again and get:
$ fpc
Free Pascal Compiler version 2.4.4
At some point during the installation process, an old fpc is being copied
over the new.
I've tried removing the old fpc. But when I rerun make install, the same
thing happens.
Cheers,
Andrew Pennebaker
www.ye
r&source=bl&ots=EMUJzJKT0D&sig=LCb3KDYjiSpzh0-76R1LdJm8rJc&hl=en&ei=886gTu-sAunm0QHtmrz6BA&sa=X&oi=book_result&ct=result&resnum=3&sqi=2&ved=0CC0Q6AEwAg#v=onepage&q=lisp%20nuclear%20reactor&f=false>.
I doubt languages without *map* are up to the job.
Che
Correct. But some systems expect hex input in lowercase, and some expect it
in uppercase. It would be nice if Format('%x', [s]) and Format('%X', [s])
allowed this kind of customization.
For now, AnsiLowerCase(Format('%X', [s]) is a workaround.
Cheers,
Andrew Penne
In the future, could Format respect the difference between '%x' and '%X'?
It's useful to use the former for lowercase hexadecimal.
Cheers,
Andrew Pennebaker
www.yellosoft.us
___
fpc-pascal maillist - fpc-pascal@
It's inconsistent and ripe for bugs.
Cheers,
Andrew Pennebaker
www.yellosoft.us
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
2.6, eh? Awesome.
I'm using the SVN trunk, but it's not working for me for some reason. I'll
just wait for v2.6 then.
Cheers,
Andrew Pennebaker
www.yellosoft.us
On Thu, Oct 20, 2011 at 2:19 AM, Sven Barth wrote:
> Am 19.10.2011 20:08, schrieb Andrew Pennebaker:
>
> Ri
>From what I gather, procedure variables can indeed be referenced and passed
around, etc.
However, procedures do not return anything, so it's hard to chain them. In
functional languages, it's handy to do several nested map(map(map f ...
calls.
Cheers,
Andrew Pennebaker
www.yelloso
ase library to
allow users to customize sorting, you'll need referencable anonymous
functions.
If you've used a functional language, you know how powerful these little
functions are, and you'll miss them and want to implement them in languages
that don't have them.
Cheers,
Andrew
Right, I tried just {$mode delphi} and just generic, and when both failed I
tried them at the same time.
Maybe I'm not using a recent enough version?
Free Pascal Compiler version 2.4.4 [2011/05/01] for i386
Cheers,
Andrew Pennebaker
www.yellosoft.us
On Wed, Oct 19, 2011 at 4:34 AM, Sven
his type can't be a generic
paycheck.pas(7,25) Fatal: Syntax error, ";" expected but "<" found
Fatal: Compilation aborted
Cheers,
Andrew Pennebaker
www.yellosoft.us
On Wed, Oct 19, 2011 at 2:28 AM, Sven Barth wrote:
> Am 18.10.2011 23:08, schrieb Andrew Pennebake
use.
Pointers do the job in C, why shouldn't they in Pascal?
There are CodeSOD hacks, and there are necessary hacks. If you don't like
the void* trickery in qc <https://github.com/mcandre/qc>, issue a pull
request.
Cheers,
Andrew Pennebaker
www.yellosoft.us
2011/10/18 Roland Schäf
) Fatal: Syntax error, "=" expected but "<" found
Fatal: Compilation aborted
Either my syntax is wrong, or trunk doesn't have the syntax, or I'm having
trouble getting the trunk version.
Cheers,
Andrew Pennebaker
www.yellosoft.us
On Tue, Oct 18, 2011 at 3:55 PM,
normal function call?
Finally, does Pascal have syntax for something like Lisp's (apply f args),
or Smalltalk's Block valueWithArguments? Once I get forAll to accept
function pointers, and call the functions, I need a way to pass the values
to another function (again, unknown typ
a random string. (Except I don't know
the syntax for passing function pointers.)
Maybe you could fork my code and use templates to achieve this?
GitHub <https://github.com/mcandre/paycheck>
Cheers,
Andrew Pennebaker
www.yellosoft.us
On Tue, Oct 18, 2011 at 4:57 AM, Lukasz Sokol wro
In particular, if anyone knows a way to implement a general concatenation
function Concat(Arr1, Arr2), let me know.
Cheers,
Andrew Pennebaker
www.yellosoft.us
On Tue, Oct 18, 2011 at 1:59 PM, Andrew Pennebaker <
andrew.penneba...@gmail.com> wrote:
> Thrice is designed to work for *a
Thrice is designed to work for *any* array type, e.g. arrays of arrays of
arrays of bytes. Even if I hardcoded several thousand possible types, Thrice
wouldn't work for custom user types.
If you do find a way to make this work, please let me know.
Cheers,
Andrew Pennebaker
www.yellosoft.u
b, $44, $48, $53,
$55, $42, $73, $67, $76, $63, $61, $36,
$39, $38, $33, $34, $6e, $63, $78, $76,
$39, $38, $37, $33, $32, $35, $34, $6b,
$3b, $66, $67, $38, $37
);
Works for me!
Cheers,
Andrew Pennebaker
www.yellosoft.us
On Tue, Oct 18, 2011 at 5:36 AM, Sven Barth wrote:
> Am 18.10.2
7;abc';
hash := Encrypt(password);
password := Decrypt(hash);
write('Password: ');
writeln(password);
end.
Cheers,
Andrew Pennebaker
www.yellosoft.us
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Can this be done with arrays? I didn't mean to be too specific; I'd be happy
with any generic collection that could do this.
Cheers,
Andrew Pennebaker
www.yellosoft.us
On Mon, Oct 17, 2011 at 6:08 PM, Marco van de Voort wrote:
> In our previous episode, Andrew Pennebaker said:
&g
Does Free Pascal have anonymous functions that you can pass around, e.g. to
a sort(compare : function, arr : array) function?
If not, does anyone know any hacks to accomplish this?
Cheers,
Andrew Pennebaker
www.yellosoft.us
___
fpc-pascal maillist
's built-in generic types.
Cheers,
Andrew Pennebaker
www.yellosoft.us
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
as
#!/usr/bin/env instantfpc
program Hello;
begin
writeln('Hello World!')
end.
$ fpc hello.pas
hello.pas(1,1) Error: Illegal char constant
hello.pas(1,2) Fatal: Syntax error, "BEGIN" expected but "const string"
found
Cheers,
Andrew Pennebaker
www.yellosoft.us
On Sun, O
I can patch the fpc code to add shebangs as comments.
Cheers,
Andrew Pennebaker
www.yellosoft.us
On Sat, Oct 15, 2011 at 4:52 PM, Sven Barth wrote:
> On 15.10.2011 19:56, Andrew Pennebaker wrote:
>
>> Yes, software bloat is to be avoided. In the simplest terms, I'm asking
x27;m going to write compiled
code" or "I'm going to write interpreted code." That's kind of sad, because
when you do want to use fpc, you don't want to go through a friend's code
and manually remove his shebangs. By adding shebang comments, fpc would be
able to run
cripting capability to a programming language allows coders
to use a language to be used for shell scripts. If you love Pascal, you
might want to write sysadmin tools in Pascal to automate your workflow.
Cheers,
Andrew Pennebaker
www.yellosoft.us
On Sat, Oct 15, 2011 at 12:13 PM, Jürgen Hestermann <
background. It's simply a
convenience to write scripts, whether the language you're using is mostly
interpreted or mostly compiled.
Cheers,
Andrew Pennebaker
www.yellosoft.us
On Sat, Oct 15, 2011 at 5:47 AM, Marco van de Voort wrote:
> In our previous episode, Andrew Pennebaker sai
Yeah, I know to chmod my scripts before dot-slashing them. It's just that
fpc can't handle shebangs, and I don't want to have to choose either
scripting or compiled. I like my Pascal code to be work in either mode.
Cheers,
Andrew Pennebaker
www.yellosoft.us
On Fri, Oct 14, 2011
ring"
found
Fatal: Compilation aborted
Error: /usr/local/bin/ppc386 returned an error exitcode (normal if you did
not specify a source file to be compiled)
Cheers,
Andrew Pennebaker
www.yellosoft.us
On Fri, Oct 14, 2011 at 6:29 PM, ik wrote:
>
> On Sat, Oct 15, 2011 at 00:25, Andrew P
E.g., if fpi existed, I would add a shebang like this to my code:
#!/usr/bin/env fpi
Cheers,
Andrew Pennebaker
www.yellosoft.us
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Thanks Ager and Zhirov, the macros work!
StackOverflow<http://stackoverflow.com/questions/7759667/can-pascal-units-be-compiled-as-executables/7774138#7774138>
RosettaCode <http://rosettacode.org/wiki/Scripted_main#Free_Pascal>
Cheers,
Andrew Pennebaker
www.yellosoft.us
On Fri, Oct
Thanks, the conditional execution code helps a lot. Does $IFDEF look for an
environment or Makefile variable?
Cheers,
Andrew Pennebaker
www.yellosoft.us
On Fri, Oct 14, 2011 at 1:06 AM, Søren Ager wrote:
> On 2011-10-14 05:17, Andrew Pennebaker wrote:
>
> In some languages, e
say I want to write a dual-purpose Fibonacci program, fib.p. It
should:
1) Export a Fib (n : integer) function.
2) Compile to an executable fib.exe (or fib in Unix)
3) When the executable is run, it prompts the user for n, then prints Fib
(n).
Cheers,
Andrew Pennebaker
www.yellosoft.us
On Thu, Oct
main.p
$ ./scriptedmain
-bash: ./scriptedmain: No such file or directory
I can USE the code just fine in a second file, test.p, and compile and run a
test executable. But I'd like to be able to turn my units into
self-sufficient executables (and later add command line options).
Cheers,
Andrew Pennebak
Hmm. I tried rewriting begin/end as initialization/end, but scriptedmain.p
still won't compile to an executable. fpc just creates a .PPU file.
scriptedmain.p
https://github.com/mcandre/scriptedmain/tree/master/pascal
Cheers,
Andrew Pennebaker
www.yellosoft.us
On Thu, Oct 13, 2011 at 3:
Is it possible to have a begin/end declaration in a unit a la C's main
function? I would like my units to double as libraries and executables.
In other words, I'd like to be able to do
scriptedmain<http://rosettacode.org/wiki/ScriptedMain#Python>in
Pascal.
Cheers,
A
If I were using C, I would type:
#include "code.h"
If I were using Python, I would type:
import code
What's the command to load code in Pascal?
And where do the load commands go? Before variables? After? Within?
Cheers,
Andrew Pennebaker
w
44 matches
Mail list logo