:= instead of exposing Result ?
=\
And ALSO replaces return. Hmm... Even more interesting :)
--
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech
Result is also an (undeclared) ghost :)
--
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight
smart-linking
Note loss of debugging with GDB on smartlinked app units.
--
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R)
function Something(a,b:integer):integer, string;
Like an [single-row] array of values of diferent type ? Excellent
highly demanded !
(it may allow to avoid exessive ugly using var subroutine params )
Mixing atomic, refcounted object types in same return is appreciated too.
--
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software
{$rtti on}
==
Why not simply a new keyword :
nortti property prop1: boiolean read boolvar1; ...;
or
rttiproperty prop1: boiolean read boolvar1; ...;
which in turn can override {$rtti on}.
It looks finer granular :) It's
How looks the call of the function?
==
Smth like in Python:
(var1,var2):= MultResFunc(arg1,arg2);
--
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront
or even :
var1^,var2,@var3:= ..
--
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and
Many funcs should return bool success/failure flag and result value
for sucess (and undefined for failure). Mutiple return would excellet
for this purpose:
ret_code, func_result:= superpuperfunc(..);
if ret_code then func_result:= ...;
With the VAR approch it looks ugly :
if
For me is ugly to see a procedure call like Foo()
=
For instance, TCL solves this problem by enclosing subroutine calls in
square braces :
proc get_res {param1 param2} {
return [expr $param1 * $param2]
}
set res [get_res 3 4]
And assigning from other
Has the advantage that the name is left-aligned (see attachment).
But seems unapproppriate for defining netsted subroutines ( looks like
calling them ).
--
Shape the Mobile Experience: Free
PERL goes even furher - all variables are prefixed by $ on both
sides of assigment, so $ sign distinguishes variables and
subroutines so the latter don't need additional marking anymore :)
--
Shape the Mobile Experience:
gc = GNU C compiler
g++ = GNU C++ compiler
cpp = GNU C/C++ preprocessor
--
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software
This new world seems to be a forgotten old one - sub[routine] :)
--
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline
and work as before?
==
[..]
end:= sqrt(result*10)%i1+pow(3,j) too ?
--
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R)
But it may be weird to prepare function code to this final asiigmnent :)
Example?
Examle of successful realization of a regular (not 2*2) function with
such return ? Me can't event imagine how :)
--
Shape the Mobile
The 'sub' keyword is just ugly, not an error. ;-)
=
Feels less ugly than function for non-returning procedure for returning :)
Show the glue by the ':=' operator assigning a value to the 'end'
keyword? It doesn't make any sense for me, sorry.
=
To put
CPP is PREprocessor :) Possibly with some entensions to provide very
simple GCC/G++ functionality. Looks into its docs. Me especially
consulted in them :)
--
Shape the Mobile Experience: Free Subscription
Software experts
No, because it starts statements after 'type' 'const', 'var'.
But they (stack consts types subroutines) can be disabled in teh language.
--
Shape the Mobile Experience: Free Subscription
A working example of using RESULT varaiable :
--
function monthsstate(aperiodity: msestring): booleanarty;
begin
setlength(result,12);
if system.pos('Ja',aperiodity) 0 then result[0]:=true else result[0]:=false;
if system.pos('F',aperiodity) 0 then result[1]:=true else
end:= result;
==
It means one more memory copying opetation which can be quite
expensive in case of large data (dynarrays,..).
--
Shape the Mobile Experience: Free Subscription
Software
As to () for no params... Why not to make them arbitrary ?
Me'd rather use them, though.
--
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R)
And a procedere HAVE to NOT return a value ALWAYS :)
--
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers
But they (stack consts types subroutines) can be disabled in teh
language.
What do you want to say with this?
As in C/C++ which force all (but cycle vars) type const subroutine
declarations to be top-level.
--
Grouping the parameter signature by '(' ')' is better IMO.
===
But it makes () for no params mandatory which looks a bit ugly for
PASCAL folk :)
--
Shape the Mobile Experience: Free Subscription
Software experts and
the sintaxe end:= result; is very ugly!
===
No for everyone. It can even be expanded to pipes etc. Remember the
BASH syntax :
---
cat /tmp/fc-list.txt | egrep -v ^[ \t]*$ | awk \
-v OPT1=$SHORTPATHS \
-v OPT2=$AUTOSHORTGS \
-v OPT3=$PSF_ONLYALIASES \
end:= sqrt(result*10)%i1+pow(3,j);
=
Since 3 local variables are engaged here thus just rewritting data
pointer of a single variable etc tricks are not enough then it's
definetely impossible w/o memory copying at final.
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
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
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
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.
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
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 forefront
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, size) etc dynarray-ing.
PS: pesronally me use the result:=
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;
cmd = cmpcompare_type
--
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing
case can.
But case: only accepts (compile time) contants in its labels so its
usage is restricted.
can not guarantee that semantic is independent of order
Only in case of crossing ranges. Which can be intended for a
particular task BTW.
END
ELIF cond2 THEN BEGIN
...
END
=
In the new (MSElang) syntax, there'll no BEGIN/END here.
--
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of
hash code collisions
SHA256 too ?
--
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic
C doesn't really _have_ enumerated _types_
=
? It has the enum type directly. Don't mix it with #DEFINEd constants.
--
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at
In the new (MSElang) syntax, there'll no BEGIN/END here.
=
The THEN too :)
--
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R)
So, well have:
---
Hmm, THEN here will may be needed for syntax (IF ELIF are same
level) consistence:
-
IF cond1 THEN
...
ELIF cond2 THEN
...
ELIF cond3 THEN
...
ELIF cond4 THEN
...
ELSE [THEN ?]
...
END;
Then use case:
=
It's INTEGER switch only, AFAIK. And compare expressions may
differentiate - the case can't provide that
and it hides nesting levels.
==
In the example no levels but the top one are expected.
strings
==
Not strings but chars (convertable to integer). And case doesn't
allow changing/extending comprare expressions for conditions.
mostlikely does not what the inventor intended. ;-)
==
First matched branch will be executed :) The same as if else but
with much
*are* nested
===
They're nested not more than branches of CASE are nested :)
--
DreamFactory - Open Source REST JSON Services for HTML5 Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and
Since CASE is a partial case (a convinience syntax entention) of ELIF
then rather CASE should be removed then ELIF :)
--
DreamFactory - Open Source REST JSON Services for HTML5 Native Apps
OAuth, Users, Roles, SQL,
then - than :)
--
DreamFactory - Open Source REST JSON Services for HTML5 Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any
think this is a very clear and handsome syntax.
===
as long as FPC has := which definetely misses its brothers :)
case of string.
===
And no CASE for (strangely discriminated) float/numeric types :) And
FOR .. BY step for them as well.
I use such indentation:
===
Only the cunny indentation allows to have the code be readable. It's
an workaround :)
as C has fall through switch cases.
===
Not so bad, BTW.
--
Case of float does not make sens as with float any test on equal does
not make sens.
===
? These comparisions works well in IF.
--
DreamFactory - Open Source REST JSON Services for HTML5 Native Apps
Possible syntax for float/numeric comparisions :
if f1 =n= f2 or f1 n f2
where n is digits-after-dec_point
:)
--
DreamFactory - Open Source REST JSON Services for HTML5 Native Apps
OAuth, Users, Roles, SQL, NoSQL,
It's strange that the very convinient EL[SE]IF was in the initial
PASCAL but Borland removed it for some reason in their Delphi.
Martin, EL[SE]IF are HIGHLY required :)
--
DreamFactory - Open Source REST JSON Services
Do You request real code from PODPISKA ROZNITSA ? OK:
--
procedure tmt1inputfo.findindexexec(const sender: TObject);
begin
with qryFindBase do begin
active:= false; active:= true;
if recordcount = 0 then begin
may_ok:= false;
showmessage('Данный
a short form of else if
=
No. It does't deep into upper IF :)
ELIF is especially good for checkin triple non-CASEable switches, in
the new syntax :
---
if i = 0 then
writeln(0);
elif i 0 then
writeln('0');
else
writeln('0');
end;
--
And
looks OK for me.
=
Sure, since EACH elif can be casted to else if :)
But how about :
---
if i=0 then
[..]
elif i =0
[..]
else
[..]
end;
--
DreamFactory - Open Source REST
i 0, sure.
--
DreamFactory - Open Source REST JSON Services for HTML5 Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP
I do not accept your argument that elif is not nested.
==
IF ELIFs can be swapped since independent (not nested). ELSE IF
can't since nested.
You still didn't rebut my argument that there is no indention between if
and end; as in case statement.
===
My
They calculate differently :
ELIF is CondA || CondB || CondC || ...
ELSE IF is smth like !CondA !(!CondB !(!CondC ..)).
--
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the
ELSE IF is smth like !CondA !(!CondB !(!CondC ..)).
=
If complier isn't smart enough to sipmplify these relations (possibly
to CondA || CondB || CondC || .. as the bolean logic rules) in
compile time then it'll have less behefits from branch predictions etc
CPU h/w
if var1 2 then
result:= true;
var1:= 3;
else
result:= false;
var1:= 5;
end;
=
Much better :) Even better than if .. {} else {}.
How about combined elif/elseif ? Me think it's highly demanded.
Nested else if starts another hierarchy level. Very inconvineient messy.
Case is for integer switches currently.
--
DreamFactory - Open Source REST JSON Services for HTML5 Native Apps
OAuth, Users, Roles, SQL, NoSQL,
So, if you can use if-else-if construction, why he will implement a
if-eleif construction that do the same?
Personanly me often get messed with else-if :)
--
DreamFactory - Open Source REST JSON
Can you show real code?
=
if a = 0 then
writeln ('a=0');
else
if a = 1 then
writeln ('a=1');
end
else
if a = 2 then
writeln ('a=2');
end
else
writeln ('a=else');
end;
end;
With elif:
==
if a = 0 then
writeln ('a=0');
elif a = 1 then
writeln ('a=1');
elif a = 2 then
writeln ('a=2');
else
writeln ('a=else');
end;
--
DreamFactory - Open Source REST JSON Services for
Here a=else a = 2 depend on the decision for a=1 which in turn
depends on the one for a=0. So we have 3 hirerarchy levels. To see
the effect better me add some more padding:
--
if a = 0 then
writeln ('a=0');
else
if a = 1 then
writeln ('a=1');
http://www.cise.ufl.edu/~mssz/Pascal-CGS2462/ifs-and-loops.html
-
4.2. PASCAL Selection Structures.
The PASCAL language provides IF or BLOCK-IF constructs, where the
latter is a variation of the IF statement, as discussed in Section
3.1. We define
Or to user ; as a statement separator only (like in BASH) ,
arbitrary on line endings
---
if c = 0 then
for a in 0..c do
b:= b + ar[a]; c:= ar[a] + 9
d:= b + 2
end // done in BASH
end // fi in BASH
for a in 0..c do b:= a *3 done; b:= b +5
To replace with another char/keyword. Smth like :
--
procedure test(para ALSO parb: int32, parc: int8, pard: boolean);
--
DreamFactory - Open Source REST JSON Services for
It's inspired by active using BASH and TCL.
--
DreamFactory - Open Source REST JSON Services for HTML5 Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the
Either the double meaning of ; or a new keyword :)
--
DreamFactory - Open Source REST JSON Services for HTML5 Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or
There's also possible C-syntax (with curly braces and combo operators) :
finction finc1(var1: integer): boolean {
locvar1: integer
locvar1:= 2; locvar*=3
if 2 var1 {
result:= true
} else {
result:= false
}
}
Correspoinding Pascal syntax looks like :
function finc1(var1: integer): boolean;
var
locvar1: integer
begin
locvar1:= 2; locvar*=3;
if 2 var1 then begin
result:= true
end else begin
result:= false;
end;
end;
--
Sure, with the general IF syntax.
what is *=?
A mistake. Should be locvar1:= locvar1*3;.
--
DreamFactory - Open Source REST JSON Services for HTML5 Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free
Current MSElang syntax:
==
Anyway a lot of stub text almost hiding the useful code :)
--
DreamFactory - Open Source REST JSON Services for HTML5 Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and
Python-like :
=
finction finc1(var1: integer): boolean:
locvar1: integer
locvar1:= 2; locvar1*=3
if 2 var1:
result:= true
else:
result:= false
--
DreamFactory - Open Source REST JSON Services for HTML5
if 2 var1 then begin // double stuff
result:= true; // single stuff
end else begin // triple stuff
result:= false; // single stuff
end; // double stuff
--
DreamFactory - Open Source REST JSON Services for HTML5
At least, it is not _neccessary_.
Or abitrary - for rare cases when the current var1,..varN:typename is used.
--
DreamFactory - Open Source REST JSON Services for HTML5 Native Apps
OAuth, Users, Roles, SQL,
Compile time range checks already have a benefit.
==
Sure. Anyaway specifing (or assuming) bitlength is range check as well
:) Also if range is 2pwrN then overflow check may rely on CPU hardware
(checking its Overflow flag with a single JNO ASM ibstruction).
Looks fixed :)
--
DreamFactory - Open Source REST JSON Services for HTML5 Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any
You probably accidentally set ow1_canclosenil
==
Most probably me misunderstood the meaning of this option - smth like
alowing NULL DB-values on checking edit widgets in OnCloseQuery :)
--
DreamFactory - Open
It seems that you set enabled:= false of the widget which currently has input
==
The code doesn't enter here whan the issue occurs (looks for HERE below):
--
procedure twidget.enabledchanged;
var
int1: integer;
bo1: boolean;
begin
bo1:= isenabled;
if not bo1 then
The with construction is well optimized by complilers. Also without
with we'll have C-ish nightmare with long chained OOP idents.
--
DreamFactory - Open Source REST JSON Services for HTML5 Native Apps
OAuth, Users,
onclosequery does not fire if it looses input focus.
==
Is it possible on modal forms ?
--
DreamFactory - Open Source REST JSON Services for HTML5 Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB
Martin, how about public voting about MSElang features (all the
proposals) on MSEGUI.ORG ?
--
DreamFactory - Open Source REST JSON Services for HTML5 Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and
Too few persons involved in discussions proposals agitating
taking decisions for a public project :)
--
DreamFactory - Open Source REST JSON Services for HTML5 Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB
s it possible on modal forms ?
I don't know. Why the question?
Its' impossible for a modal form to loose its focus, correct ?
PS: anyway,it's starnge with the PODPISKA that the modal form appears
loosing its focus on disabling its internal widgets.
It was because gbMonths will be disabled while a child is focused.
===
Another widget (dbseName) has taboder=0 (focused by default, correct
?) on this form . But gbMonths of this form also has a widget with
taborder=0 (dbbeM01) on disabling which we have the unexpected
it this project is created immediately (w/o leaving IDE) after closing
another project.
--
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
Works OK in a simple project.
Should me prepare the PODPISKA full testcase instead ?
--
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
win-32 ?
--
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most
from
With arbitrary ;, how about a kind of the Python syntax - that's
w/o garbage then, do end statements ?
Currently it's emulated like :
function http_file_size(const http: thttpsend; const url: msestring;
var filesize: integer; var hdrsize: cardinal): treqresult;
var
i:integer;
Additional ';' after statements are possible, they are treated as
empty statements.
==
Like in BASH TCL ? A good idea :)
--
November Webinars for C, C++, Fortran Developers
Accelerate application
Did you model the showmodal call?
==
Is it it ?
-
procedure tmainfo.goexec(const sender: TObject);
begin
try
application.createform(tworkfo, workfo);
workfo.show(true); // HERE
finally
freeandnil(workfo);
end;
end;
It seems that me couldn't catch this problem because stepped debugging
breaks the form modality sequence. With changing BP placement to
traverse this sequece w/o stepping, it's found that the focus loss
happened when disabling the below widget, before calling
window.setfocusedwidget(nil):
'namespaces'
=
In C, it's mainly designed to combine a single unit from several
simplier mixed ones to simulate the Pascal unit-ing.
Pascal also offers the unit.ident access syntax which is a namespace in sense.
gdb provides the text.
==
And MSEide processes it. Decoding would be very useful for recognizing widgets.
--
November Webinars for C, C++, Fortran Developers
Accelerate application performance with
So why invent new names instead of using the really well known names
such as uint8_t, int16_t
==
Sounds reasonable.
--
November Webinars for C, C++, Fortran Developers
Accelerate application performance
Why not something like
bitpacked RECORD
Filed_1: integer: 7;
Filed_2: integer: 2;
Filed_3: integer: 5;
Filed_4: integer: 1;
Filed_5: integer: 1;
end
===
For non-2^N ranging.
This is not limited on a single hardware Word, but can define
to arbitrary length memory areas.
==
Really, it's important for bitpacked data.
--
November Webinars for C, C++, Fortran Developers
Accelerate
Definitions like
-
var1: 0..22;
or
var1: integer from 0 to 22;
might by useful multiarch programming since compiler may select needed
internal (arch-specific) type - emulated 64bit even for 8-bit arch for
instance so that programs work in
201 - 300 of 964 matches
Mail list logo