The only thing I'd want to change is that you have to give a dimension to an Array in procedure. Since the array is provided from an external source it doesn't make sense to pre-dim the Array.
Not exactly related to this topic, though.
Deprecate words 'Dim', 'NewList', 'NewMap'
Re: Deprecate words 'Dim', 'NewList', 'NewMap'
Not at all. Without an extensive redo of the documentation it would be much more confusing to beginners.gavindi wrote:I like your suggestion. It would bring a little more consistency to the syntax. +1
The documentation already has:
Chapter 93
Array
and
93.1
ArraySize
Syntax
Result = ArraySize ( Array () [ , Dimension ])
If you were to rename it, then
DimensionArray() and RedimensionArray()
would make far more sense than the previous suggestion.
Leave it alone or change EllapsedMilliseconds() to RetrieveCurrentTimerValue()
Because in my code the elapsed milliseconds actually has to be calculated from the returned value of EllapsedMilliseconds().
If it ain't broke...
Good idea.Derren wrote:The only thing I'd want to change is that you have to give a dimension to an Array in procedure. Since the array is provided from an external source it doesn't make sense to pre-dim the Array.
Keep it BASIC.
Re: Deprecate words 'Dim', 'NewList', 'NewMap'
Apropos documentation...
When I hit F1 on "Array" I am directed to the Array help page where I have to find Array manually. This is true for a few keywords that are bunched up together on a single page. I don't know if chm files support anchors, else single subpages or at least a clickable link index on top of each page would be a good idea...
When I hit F1 on "Array" I am directed to the Array help page where I have to find Array manually. This is true for a few keywords that are bunched up together on a single page. I don't know if chm files support anchors, else single subpages or at least a clickable link index on top of each page would be a good idea...
- Psychophanta
- Always Here
- Posts: 5153
- Joined: Wed Jun 11, 2003 9:33 pm
- Location: Anare
- Contact:
Re: Deprecate words 'Dim', 'NewList', 'NewMap'
The issue is that there are some prefixes, like 'Open' like OpenWindow(), 'Add', 'New', 'Create' like CreateSprite(), and perhaps this should be revised for more syntax consistence.
Re: Deprecate words 'Dim', 'NewList', 'NewMap'
Everything's fine the way it is, if it's not broken don't fix it.
Tho if any change at all.
Tho if any change at all.
- NewList => CreateList
- NewMap => CreateMap
-
- Addict
- Posts: 1264
- Joined: Wed Feb 28, 2007 9:13 am
- Location: London
Re: Deprecate words 'Dim', 'NewList', 'NewMap'
I agree with the OP.
It adds nothing, in terms of clarity or function, to have separate words for writing an array inside and outside a structure. With that in mind, why not just make things as simple as possible and use one word?
It adds nothing, in terms of clarity or function, to have separate words for writing an array inside and outside a structure. With that in mind, why not just make things as simple as possible and use one word?
JACK WEBB: "Coding in C is like sculpting a statue using only sandpaper. You can do it, but the result wouldn't be any better. So why bother? Just use the right tools and get the job done."
Re: Deprecate words 'Dim', 'NewList', 'NewMap'
Why not have a more powerful pre-compiler?Seymour Clufley wrote:I agree with the OP.
It adds nothing, in terms of clarity or function, to have separate words for writing an array inside and outside a structure. With that in mind, why not just make things as simple as possible and use one word?
This is possibly valid code in theory:
Code: Select all
Define foo.i(1)
foo(0)=20
foo(1)=30
Procedure bla(myArray())
ProcedureReturn myArray(0) + myArray(1)
EndProcedure
Debug bla(foo()) ;50