Re: [MSEide-MSEgui-talk] MSElang, subrange type necessary?

2013-11-08 Thread Ivanko B
BTW, shortcuts for range check might be very handy : --- if i in 1..10 then --- or --- if i between 1 and 10 then --- less cumbersome than - if (i = 1) and (i =10) than -

Re: [MSEide-MSEgui-talk] MSElang, subrange type necessary?

2013-11-08 Thread Martin Schreiber
On Friday 08 November 2013 08:54:38 Ivanko B wrote: Do you use Pascal subrange type? Would you miss it? = Me use one in other languages - in BASH : - for i in `seq 1 10`; do echo $i done - for instance. in SQL :

Re: [MSEide-MSEgui-talk] MSElang, fixsize numeric base types

2013-11-08 Thread Martin Schreiber
On Friday 08 November 2013 08:56:23 Ivanko B wrote: two syntaxes for same thing Which should be avoided. --- Why ? Just shortcuts (short/simplified notations) for user convinience :) From the Wiki: The design goals 1. Simple. Reduce the language concepts

Re: [MSEide-MSEgui-talk] MSElang, subrange type necessary?

2013-11-08 Thread Martin Schreiber
On Friday 08 November 2013 09:00:12 Ivanko B wrote: BTW, shortcuts for range check might be very handy : --- if i in 1..10 then --- or --- if i between 1 and 10 then --- less cumbersome than - if (i = 1) and (i =10) than -

Re: [MSEide-MSEgui-talk] MSElang, subrange type necessary?

2013-11-08 Thread misu kun
Hi, Do we need subrange types? i personally never used them , since using native types would do the job as well -- November Webinars for C, C++, Fortran Developers Accelerate application performance with scalable

Re: [MSEide-MSEgui-talk] MSElang, subrange type necessary?

2013-11-08 Thread Ivanko B
/lib/common/i18n/mseucs2ru.pas : --- const cp866_2: array[$2550..$256C] of byte = ( $cd,$ba,$d5,$d6,$c9,$b8,$b7,$bb,$d4,$d3,$c8,$be,$bd,$bc,$c6, $c7,$cc,$b5,$b6,$b9,$d1,$d2,$cb,$cf,$d0,$ca,$d8,$d7,$ce ); cpUCS2_1: array[$b5..$be] of longword = (

Re: [MSEide-MSEgui-talk] MSElang, fixsize numeric base types

2013-11-08 Thread Ivanko B
Reduce the language concepts one has to learn to the minimum == Typedefs aren't language complications - they just use the language. Shortcuts are very handy for instance @ instaed of addr()/ -- November

Re: [MSEide-MSEgui-talk] MSElang, subrange type necessary?

2013-11-08 Thread Michael Schnell
On 11/08/2013 07:00 AM, Martin Schreiber wrote: Do we need subrange types? I understand subranges are only useful for defining arrays with same as index. But as you want to disallow whatever based arrays, I doubt array[TSubrange] makes much sense. In fact a subrange is a special case of an

Re: [MSEide-MSEgui-talk] MSElang, subrange type necessary?

2013-11-08 Thread Ivanko B
Hmm, arbitrary array beginning presents one of specific Pascal features sometimes very handy for expressing entities if the real world. It's usually well optimized (acccess via base register,..). While accessing may be emulated by index shift but it's definetely an workaround.

Re: [MSEide-MSEgui-talk] MSElang, subrange type necessary?

2013-11-08 Thread Ivanko B
may be emulated by index shift but it's definetely an workaround. == And calculating this shift on each access eats some CPU ticks :) -- November Webinars for C, C++, Fortran Developers

Re: [MSEide-MSEgui-talk] MSElang, subrange type necessary?

2013-11-08 Thread Ivanko B
A strange idea :) Why not to combine ranged ingtegers, enums sets in a single type ? -- November Webinars for C, C++, Fortran Developers Accelerate application performance with scalable programming models. Explore

Re: [MSEide-MSEgui-talk] MSElang, fixsize numeric base types

2013-11-08 Thread Ivanko B
Ranging for integers may also help to build not yet hardware suported types, like : - var i1: integer from 0 to 2^^256; // 2prw256 i2: integer:256; --- Sure, with emulated access to them. --

Re: [MSEide-MSEgui-talk] MSElang, fixsize numeric base types

2013-11-08 Thread Michael Schnell
On 11/08/2013 11:30 AM, Ivanko B wrote: Ranging for integers may also help to build not yet hardware suported types, Somewhat similar, but IMHO by far not as useful as Records defining bit-field variables. -Michael --

Re: [MSEide-MSEgui-talk] some opinions

2013-11-08 Thread Dennis Poon
My knowledge in this matter is low so just ignore me if I am saying something stupid. Can future unit contains a class variable e.g. Unit Strings; Type TStrings=class; TStringsClass = class of TStrings; var DefaultStringsClass : TStringsClass = TStrings; In user's project

Re: [MSEide-MSEgui-talk] some opinions

2013-11-08 Thread Martin Schreiber
Dennis, please register here: https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk Thanks. On Friday 08 November 2013 11:36:18 Dennis Poon wrote: My knowledge in this matter is low so just ignore me if I am saying something stupid. Can future unit contains a class variable e.g.

Re: [MSEide-MSEgui-talk] some opinions

2013-11-08 Thread Martin Schreiber
On Friday 08 November 2013 17:19:59 Dennis wrote: Resend using the correct email address Dennis Poon wrote: My knowledge in this matter is low so just ignore me if I am saying something stupid. Can future unit contains a class variable e.g. Unit Strings; Type TStrings=class;

Re: [MSEide-MSEgui-talk] MSElang, fixsize numeric base types

2013-11-08 Thread Martin Schreiber
On Friday 08 November 2013 06:46:55 Martin Schreiber wrote: On Friday 08 November 2013 00:08:09 Sieghard wrote: Hallo Martin, Du schriebst am Thu, 7 Nov 2013 06:27:46 +0100: BTW, int(eger) already does imply signedness, usually (mathematically). Yup. What could be used instead

Re: [MSEide-MSEgui-talk] MSElang, fixsize numeric base types

2013-11-08 Thread Martin Schreiber
On Friday 08 November 2013 17:32:56 Martin Schreiber wrote: You might opt to spell it out as integer, I think. That is not better IMHO. uint, sint - uinteger, sinteger. What about unum, snum? Or ord8, ord16, ord32, ord64, int8, int16, int32, int64? Or card8, card16, card32, card64,

Re: [MSEide-MSEgui-talk] MSElang, fixsize numeric base types

2013-11-08 Thread Vladislav Javadov
Or ord8, ord16, ord32, ord64, int8, int16, int32, int64? MS Or card8, card16, card32, card64, int8, int16, int32, int64? MS :-) Why ordXX, not wordXX? Look at Context language by Andrey Hohlov. -- WBR, Vladislav Javadov

Re: [MSEide-MSEgui-talk] MSElang, fixsize numeric base types

2013-11-08 Thread Martin Schreiber
On Friday 08 November 2013 19:14:31 Vladislav Javadov wrote: Or ord8, ord16, ord32, ord64, int8, int16, int32, int64? MS Or card8, card16, card32, card64, int8, int16, int32, int64? MS :-) Why ordXX, not wordXX? Look at Context language by Andrey Hohlov. We need a base name for unsigned

Re: [MSEide-MSEgui-talk] MSElang, fixsize numeric base types

2013-11-08 Thread Martin Schreiber
On Friday 08 November 2013 00:39:58 Sieghard wrote: Suppose there's some part having a 16 bit register that's subdivided into 5 fields, bits 0 through 6, 7...8, 9...13, 14 and 15 (the latter are 1-bit fields, of course). Your construct might then look like: Register = RECORD

Re: [MSEide-MSEgui-talk] MSElang, fixsize numeric base types

2013-11-08 Thread Ivanko B
Why do you suggest word for unsigned number? == word - longword(=dword = cardinal) - qword.. -- November Webinars for C, C++, Fortran Developers Accelerate application performance with scalable

Re: [MSEide-MSEgui-talk] MSElang, fixsize numeric base types

2013-11-08 Thread Martin Schreiber
On Friday 08 November 2013 20:19:54 Ivanko B wrote: Why do you suggest word for unsigned number? == word - longword(=dword = cardinal) - qword.. Yes, but word in Pascal is fixed 16bit. I more like card - cardinal. Martin

Re: [MSEide-MSEgui-talk] MSElang, fixsize numeric base types

2013-11-08 Thread Ivanko B
Cardinal is 32 bits only as long as word expresses unsiged types of 2,4,8 so on bytes length. That's currently in Pascal : *int=signed and *word=unsigned (with aliaces shortint=int8,integer=int16, byte=1/2word, cardinal=dword).

Re: [MSEide-MSEgui-talk] MSElang, subrange type necessary?

2013-11-08 Thread Sieghard
Hallo Ivanko, Du schriebst am Fri, 8 Nov 2013 13:00:12 +0500: BTW, shortcuts for range check might be very handy : Use sets. --- if i in 1..10 then --- if i in [1..10] then ... Do the brackets bother you? BTW, yes, that applies only to ranges accomodated by set

Re: [MSEide-MSEgui-talk] MSElang, subrange type necessary?

2013-11-08 Thread Sieghard
Hallo Martin, Du schriebst am Fri, 8 Nov 2013 10:03:49 +0100: Arbitrary array indices probably will be removed. Wiki: 14. Item index of strings and arrays is zero-based. Well - design decision. 15. No arrays of arbitrary range, Incomplete language implementation. type

Re: [MSEide-MSEgui-talk] MSElang, subrange type necessary?

2013-11-08 Thread Sieghard
Hallo Ivanko, Du schriebst am Fri, 8 Nov 2013 14:54:47 +0500: A strange idea :) Why not to combine ranged ingtegers, enums sets in a single type ? Doesn't work. At least sets are different beasts. -- -- (Weitergabe von Adressdaten, Telefonnummern u.รค. ohne Zustimmung nicht gestattet,

Re: [MSEide-MSEgui-talk] MSElang, subrange type necessary?

2013-11-08 Thread Sieghard
Hallo Ivanko, Du schriebst am Fri, 8 Nov 2013 14:47:45 +0500: Hmm, arbitrary array beginning presents one of specific Pascal Not so - they're older, probabely dating back to PL/I. The Algols (Algol 60 68) also had them. (Algol is a short form for Algorithmic language.) -- -- (Weitergabe

Re: [MSEide-MSEgui-talk] MSElang, subrange type necessary?

2013-11-08 Thread Sieghard
Hallo Michael, Du schriebst am Fri, 08 Nov 2013 10:40:11 +0100: On 11/08/2013 07:00 AM, Martin Schreiber wrote: Do we need subrange types? I'd opt for them. I understand subranges are only useful for defining arrays with same as index. TYPE MonthDay = 1..31; WeekDay = 1..7;

Re: [MSEide-MSEgui-talk] MSElang, fixsize numeric base types

2013-11-08 Thread Martin Schreiber
On Friday 08 November 2013 22:48:28 Ivanko B wrote: Cardinal is 32 bits only as long as word expresses unsiged types of 2,4,8 so on bytes length. Not in TP mode. From Delphi 7 manual: The generic integer types are Integer and Cardinal. Martin

Re: [MSEide-MSEgui-talk] MSElang, subrange type necessary?

2013-11-08 Thread Martin Schreiber
On Friday 08 November 2013 23:17:40 Sieghard wrote: 15. No arrays of arbitrary range, Incomplete language implementation. Why? We don't talk about Pascal. I often see errors in programs because of wrong 0/1 array starting index. Oberon doesn't have it either: 6.2. Array types An array is