It's also possible to define subroutines without keywords at all:
-
type
class1 = class
f1: integer;
proc1();
fucn1(arg1: integer): bool;
end;
ipmplementation
class1.proc1();
begin
[..]
end;
class1.fucn1(arg1: integer): bool;
begin
[..]
end;
--
probably is too exotic. ;-)
==
Some languages (BASH, TCL,..) return results of last assigmnent :)
'var' or 'out'
==
looks like "var" with automanaged memory.
It's also possible to call setlength(result, ) etc dynarray-ing.
PS: pesronally me use the "result:=" appro
On Thursday 21 November 2013 08:31:13 Ivanko B wrote:
> "Sub" since it's shorter :)
> And how about removing "var" & "begin" in subroutibe defenitions ? Smth
> like : ---
> sub test1(cosnt arg1: integer): bolean
> v1: integer;
> v1:= 1;
> return arg1 = v1;
> end;
> --
On Thursday 21 November 2013 07:56:12 Ivanko B wrote:
> Unneeded extra variables incl stack ones & stuff lines, smth like :
>
> procedure strfunc(): msestring;
> begin
> result:= 'The string result:'
> if 1 <> 2 then
> result:= result + 'mumu';
> else
> result
"Sub" since it's shorter :)
And how about removing "var" & "begin" in subroutibe defenitions ? Smth like :
---
sub test1(cosnt arg1: integer): bolean
v1: integer;
v1:= 1;
return arg1 = v1;
end;
--
but then how to be with nested "const", "type"etc ? Hmm...
Unneeded extra variables incl stack ones & stuff lines, smth like :
procedure strfunc(): msestring;
begin
result:= 'The string result:'
if 1 <> 2 then
result:= result + 'mumu';
else
result:= result + 'koko';
end;
end;
We have 6 non-stuff lines & 7 body line
Oberon uses 'procedure' too.
===
Then better "sub[routine]" which means both "function" & "procedure" :)
--
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the fore
If you do not have parameters, why I need use this '()'
===
So that visually not to mess them with variables, me guess :)
--
Shape the Mobile Experience: Free Subscription
Software experts and developer
On Wednesday 20 November 2013 19:38:22 Ivanko B wrote:
> Returning NEW strings, dynarrays etc refcounted (automatically
> destroyable) types from function.
>
As usual I still don't understand.
"
procedure strfunc(): msestring;
begin
return 'The string result';
end;
procedure test;
var
s1: msestr
On Thursday 21 November 2013 00:55:05 Sieghard wrote:
>
> Just a question: could you give some symbolic syntax representation?
> E.g. Backus-Naur representation, "railroad diagram" or such?
> This would make it easier to spot inconsistencies and collisions and such.
>
Later when it has been settled
On Wednesday 20 November 2013 23:01:52 Marcos Douglas wrote:
> On Wed, Nov 20, 2013 at 1:01 PM, Martin Schreiber
wrote:
> > Hi,
> >
> > '()' for procedure header and procedure calling is mandatory.
> > "
> > procedure noparams();
> > begin
> > end;
> >
> > procedure test();
> > begin
> > noparam
Hallo Michael,
Du schriebst am Wed, 20 Nov 2013 11:59:23 +0100:
> On 11/19/2013 06:38 PM, Ivanko B wrote:
> > "case" can.
> >
> > But "case: only accepts (compile time) contants in its labels so its
> > usage is restricted.
> An improved language could do away with this rathe
Hallo Michael,
Du schriebst am Wed, 20 Nov 2013 11:45:56 +0100:
> > _No_ language can make certain that a preprocessor cannot be used.
> It can make use of the preprocessor syntax itself (e.g. requiring a # at
> the start of a line for some purpose)
No, it _cannot_, because these syntactic ele
Hallo Martin,
Du schriebst am Wed, 20 Nov 2013 16:01:49 +0100:
> '()' for procedure header and procedure calling is mandatory.
...
> There will be no extra reserved name for functions, functions are defined
...
> Opinions?
Just a question: could you give some symbolic syntax representation?
E.g
Hallo Michael,
Du schriebst am Wed, 20 Nov 2013 12:05:31 +0100:
> Objects are not "constant" but more like "static" classes. And in fact
I never said that objects were constant. (They're not "static" either, as
that's an undefined notion with Pascal.)
All I said was that you could declare const
Hallo Ivanko,
Du schriebst am Wed, 20 Nov 2013 10:06:20 +0500:
> hash code collisions
>
> SHA256 too ?
Any code that uses fewer bits than the encoded item. Try prove the
opposite, and when you succeed, write an article in some high ranking
mathematical journal.
--
--
(Weiterg
Hallo Michael,
Du schriebst am Wed, 20 Nov 2013 11:22:41 +0100:
> > Ok, let's look at it this way. Then, what's the value of this lone sign
> > bit?
> This is obvious.
Then give the value.
> Take a look at the predecessor of zero as done by the algorithm any
> (modern) ALU does
That's simply
Hallo Ivanko,
Du schriebst am Wed, 20 Nov 2013 10:08:51 +0500:
> C doesn't really _have_ enumerated _types_
> =
> ? It has the "enum" type directly. Don't mix it with #DEFINEd constants.
"enum" defines a sequence of symbolic constants, something C doesn't
support natively like Pa
Hallo Michael,
Du schriebst am Wed, 20 Nov 2013 11:29:01 +0100:
> On 11/19/2013 09:31 PM, Sieghard wrote:
> > C doesn't really _have_ enumerated _types_.
> the compiler seems to think differently as he happily compiles:
>
> typedef enum claimUsage_e { LTE_CLAIM_SEM_MGT,
> LTE_CLAIM_SEM_BASE,
> L
On Wed, Nov 20, 2013 at 1:01 PM, Martin Schreiber wrote:
> Hi,
>
> '()' for procedure header and procedure calling is mandatory.
> "
> procedure noparams();
> begin
> end;
>
> procedure test();
> begin
> noparams();
> end;
> "
No, no, no...please! :(
I know that you want to make a language more
On Wed, Nov 20, 2013 at 1:01 PM, Martin Schreiber wrote:
> Hi,
>
> '()' for procedure header and procedure calling is mandatory.
> "
> procedure noparams();
> begin
> end;
>
> procedure test();
> begin
> noparams();
> end;
> "
No, no, no...please! :(
I know that you want to make a language more
On Tue, Nov 19, 2013 at 10:12 PM, Sieghard wrote:
> Hallo Marcos,
>
> Du schriebst am Tue, 19 Nov 2013 00:25:26 -0200:
>
>> > There's no "new ALIAS compiler parameter" neccessary.
>>
>> I know there is no new ALIAS parameter... So I'm proposing one.
>
> Read completely - there is no ALIAS paramete
Returning NEW strings, dynarrays etc refcounted (automatically
destroyable) types from function.
--
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
In
On Wednesday 20 November 2013 17:53:17 Ivanko B wrote:
> Why ?! It's one of best advantages of ObjPascal allowing not to bother
> about allocating/freeing memory for non-atomic function result types.
>
Please explain, I don't understand.
Delphi 'result' is not well defined, especially with referen
Why ?! It's one of best advantages of ObjPascal allowing not to bother
about allocating/freeing memory for non-atomic function result types.
--
Shape the Mobile Experience: Free Subscription
Software experts and developer
On Wednesday 20 November 2013 17:02:14 Ivanko B wrote:
> The "result" auto-variable will also be available ?
>
No.
--
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of t
The "result" auto-variable will also be available ?
--
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic
Hi,
'()' for procedure header and procedure calling is mandatory.
"
procedure noparams();
begin
end;
procedure test();
begin
noparams();
end;
"
Parameter separator is ','.
"
procedure params(a: int32, b: int32);
begin
end;
procedure test();
begin
params(123,456);
end;
"
There will be no extr
silly restriction
==
Possibly taken to aviod crossing ranges in run-time (not revealed at
compile time).
--
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the
On 11/20/2013 01:23 AM, Sieghard wrote:
> They've been just resently removed from Delphi. They were called
> "object"s,
Objects are not "constant" but more like "static" classes. And in fact
they have not been removed but replaced by enhancing the "record"
concept to allow for what "objects" we
On 11/19/2013 06:38 PM, Ivanko B wrote:
> "case" can.
>
> But "case: only accepts (compile time) contants in its labels so its
> usage is restricted.
An improved language could do away with this rather silly restriction
-Michael
---
On 11/19/2013 03:53 PM, Martin Schreiber wrote:
> "case" can. Having "elseif" looking like "case" is evil.
I think the contrary:
as well with "case" as with an "elseif" (or with pure fpc syntax: "end
else if ... then begin") cascade only one of the multiple alternatives
is taken (other then wi
On 11/19/2013 02:52 PM, Martin Schreiber wrote:
>
> It is planned to unify record, object and class in a single concept.
Nice and consequently thought out !
-Michael
--
Shape the Mobile Experience: Free Subscription
Softw
On 11/20/2013 12:56 AM, Sieghard wrote:
> _No_ language can make certain that a preprocessor cannot be used.
It can make use of the preprocessor syntax itself (e.g. requiring a # at
the start of a line for some purpose)
> _No_ language should depend on the use of a preprocessor.
Right.
> You g
On 11/19/2013 09:31 PM, Sieghard wrote:
> C doesn't really _have_ enumerated _types_.
the compiler seems to think differently as he happily compiles:
typedef enum claimUsage_e { LTE_CLAIM_SEM_MGT,
LTE_CLAIM_SEM_BASE,
LTE_VT_MGT,
LTE_VT_BASE } LTE_claimUsage_e;
-Michael
--
On 11/19/2013 09:20 PM, Sieghard wrote:
>
>> Yep. The highest order bit in a number in the "2's complement" encoding
>> is the sign bit.
> Ok, let's look at it this way. Then, what's the value of this lone sign bit?
This is obvious.
Take a look at the predecessor of zero as done by the algorithm a
36 matches
Mail list logo