Page 1 of 1 1
Topic Options
#81496 - 2003-02-08 04:35 PM Dim & Assign Statement
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
This has been mentioned before but just wanted to bump it back into focus:

Would be a wonderful shortcut if we could DIM and ASSIGN in one statement. Possible examples:

code:
 
Dim $Number = 5

Dim $String = "Kixtart"

Dim $Array = 1,2,3

-Shawn

[ 08. February 2003, 16:46: Message edited by: Shawn ]

Top
#81497 - 2003-02-08 04:47 PM Re: Dim & Assign Statement
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
And a
code:
CONST $constant = 3.1415

would be nice, too.

Also, a ByVal/ByRef designator for UDF parameters would be very helpful and enable more COM functionality, as some COM interfaces require this.
_________________________
There are two types of vessels, submarines and targets.

Top
#81498 - 2003-02-08 04:48 PM Re: Dim & Assign Statement
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
So CONST would mean that this variable is readonly ? Good idea !
Top
#81499 - 2003-02-08 05:58 PM Re: Dim & Assign Statement
Lee Wilmott Offline
Starting to like KiXtart

Registered: 2002-09-17
Posts: 106
Loc: Bristol, UK
Here here!

Being able to declare constants is something that I have been wanting to see for a long time!

...I just want to add my support for this suggestion.

Lee

Top
#81500 - 2003-02-09 03:56 PM Re: Dim & Assign Statement
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
Also, shouldn't a CONST also be Global if it's declared in the main routine?

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#81501 - 2003-02-09 04:15 PM Re: Dim & Assign Statement
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Not neccessarily, however, a GLOBAL CONST should be issued in that case.
_________________________
There are two types of vessels, submarines and targets.

Top
#81502 - 2003-02-17 11:47 PM Re: Dim & Assign Statement
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
I've never understood constants as they are constant if you don't change them.

but assigning a start value for var is a goodie
_________________________
!

download KiXnet

Top
Page 1 of 1 1


Moderator:  Lonkero, ShaneEP, Jochen, Radimus, Glenn Barnas, Allen, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 2220 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.083 seconds in which 0.029 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org