My question, is one way better than the other? I haven't had any issues with
using the PathDelim that I've noticed. It looks, to me at least, as
though it
would be personal preference. I'm just not sure if I'm correct.
(See, I told you it was an easy question this time...) ;)
My question, is one way better than the other? I haven't had any issue using the PathDelim that I've noticed. It looks, to me at least, as
If you see those ifdefs then it means someone hadn't read http://wiki.freepascal.org/Multiplatform_Programming_Guide or copied
that code from someone who hadn't read it.
Use PathDelim, it's easier and if freepascal is ported to some new platofrm that uses : as separators, it'll work.
I started using PathDelim when I wanted to port from Linux to Windows.
It's
made life so much easier.
While looking at some others code, I've noticed they will use something like:
{$IFDEF WIN32}
PathChar = '\';
{$ENDIF}
{$IFDEF LINUX}
PathChar = '/';
{$ENDIF}
{$IFDEF WIN32}
PathChar = '\';
{$ENDIF}
{$IFDEF LINUX}
PathChar = '/';
{$ENDIF}
If you want to stay 100% on FreePascal use PathDelim, you will be more compatible with future versions and also cross compile in all FreePascal platforms and not only windows and linux.
I also use the above code, because its easier for me to remember the word pathchar instead of pathdelim and because i stay on windows/linux platforms only.
On 08-18-18 12:44, Black Panther wrote to xqtr <=-
I've been using the PathDelim, just because it was on the
freepascal.org website. (I love the site)
I also use the compiler directives as well, but for different reasons.
I'm using them to set the operating system and whether it's 32 or
64bit.
I've been using the PathDelim, just because it was on the freepascal.org website. (I love the site)
I must get back into FreePascal. I dabbled a bit last year and Pascal started coming back to me. I like the fact that FreePascal is available for all the popular platforms.
I also use the compiler directives as well, but for different reasons I'm using them to set the operating system and whether it's 32 or 64bit.
Cool. :)
For me, it seems as though Pascal is a very simple language to use. I
did try using C and C++ at one time, but the syntax felt cryptic. I was able to muddle my way through it, but Pascal just seemed like the syntax just made sense...
I learned Pascal before I learned C. I think I was about 13-14 or something and my uncle said better to learn C. Was always afraid of it
because I came from BASIC and C was what the pros used. So I got a book and sat down and learned it from the book (Teach yourself C in 24 hours
or something). Now to me Pascal seems strange. To me C is much simpler,
but required a bit more effort to do things (than say C++ which now you have things like qsort as part of the standard library).
Once you get the hang of the basics in C, the rest is pretty easy you
just have to break down things. Like eating an elephant, one bite at a time :)
On 08-18-18 20:52, Black Panther wrote to Vk3jed <=-
It's available for all the popular platforms, but can be a pain to try
to set up cross-compiling from one system... I finally got it to
compile both Linux 64 and 32 bit. I still have to transfer the code to
the Windows system to compile that version...
For me, it seems as though Pascal is a very simple language to use. I
did try using C and C++ at one time, but the syntax felt cryptic. I was able to muddle my way through it, but Pascal just seemed like the
syntax just made sense...
I also use the compiler directives as well, but for different reasons I'm using them to set the operating system and whether it's 32 or 64bit.
Cool. :)
It took me a little bit to get it figured out, but It seems to work. :) It's something that really isn't *needed* for my programs, but it's a
nice touch...
On 08-18-18 22:38, Black Panther wrote to apam <=-
On 08/19/18, apam said the following...
I learned Pascal before I learned C. I think I was about 13-14 or something and my uncle said better to learn C. Was always afraid of it
When I first learned Pascal, I think I was 15. That was Apple Pascal on
a IIe... (Boy I feel old...)
I've been thinking about trying to learn C again, as there are many
more resources available for it, than Pascal. It seems that most of the newer languages are going to more of a scripting style, than compiled.
I still prefer the compiled. (nobody can see how bad your code looks)
;)
I think that's with any language. For me, it would just be learning a
new syntax and format.
My question is, why would you want to eat an elephant... I've never
been that hungry... ;)
Sysop: | altere |
---|---|
Location: | Houston, TX |
Users: | 68 |
Nodes: | 4 (1 / 3) |
Uptime: | 02:22:29 |
Calls: | 1,038 |
Calls today: | 2 |
Files: | 8,041 |
Messages: | 298,234 |