D
Dan Pop
In said:Out of interest and for the benefit of the OP, does the standard have
anything to say about linkage?
Quite a lot. But it is quite quiet about linking.
Dan
In said:Out of interest and for the benefit of the OP, does the standard have
anything to say about linkage?
Joe said:Certainly GNU make because I read it there and tried it and it worked. I
cannot know and don't care much about all other make programs. By the
same token I don't know that TAB is the separator other make programs.
To the extent that TAB was chosen by make's original author (Who?)
it
seems arbitrary and badly chosen.
Les said:It's a way. Python seems to have reinvented this "error".
Jeremy said:Python accepts both tabs and spaces as indentation. There's no need
to use tabs if you don't want to.
Les Cargill said:Right! I meant it's still indentation-based, which is odd in this
day and age.
Irrwahn Grausewitz said:About /linking/ refer to ISO/IEC 9899:1999 5.1.1.2#8.
About /linkage/ refer to 6.2.2., 6.7, 6.7.4, 6.7.5.2, 6.9,
6.9.2, 6.11.2, ...
HTH
Regards
But Python's indentation rules follow the informal format of all other
Algol-based languages. What you are forced to do in Python is merely
what you should be doing in C and Pascal and such anyway.
Richard said:I'm not sure if Python's equivalent of this is legal...
int function(struct object * const first_source,
struct object * const second_source,
struct object * destination)
{
/* Do something */
}
...but Python's equivalent of this certainly isn't...
if (first_object ->wibble_counter > maximum_wibbles ||
second_object->wibble_counter > maximum_wibbles)
return -1;
August said:But Python's indentation rules follow the informal format of all other
Algol-based languages. What you are forced to do in Python is merely
what you should be doing in C and Pascal and such anyway.
If you absolutely despise whitespace,
one space character works just
fine. There's no concept of sacred columns that Fortran and other
punch-card-based languages plagued us all with Back In The Day.
A small example:
def my_abs(x):
if x <= 0:
return x
else:
return -x
There. Done. That's as obnoxious as the rules get.
Jeremy Yallop said:You can certainly write something equivalent to that in Python, since
most objects are mutable, and calling a function passes references to
arguments by value.
This is written
if (first_object .wibble_counter > maximum_wibbles or
second_object.wibble_counter > maximum_wibbles):
return -1
Richard said:I wasn't talking about the semantics, merely about the indentation.
Like bloody hell it is. That is _not_ as legible.
Jeremy Yallop said:If you want, you change the indentation of the return statement.
There's no need to lose your temper.
if (first_object .wibble_counter > maximum_wibbles or
second_object.wibble_counter > maximum_wibbles):
return -1
is fine, too.
Richard said:Not in any version of Python I've used.
Seems that would be easy enough to solve. Open Source,
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.