Hi everyone
I'm posting again this question as my system was down at time of the first
posting...well something in the newsgroups was down.
I'd like to know how i should declare a constant as an array with two
dimension. I've tried the following but seems the syntax is somehow wrong.
Can someone help me in doing so or any clue would be fully appreciate.
Here is my bugged code:
Const TableDOB(1..3,1 ..2) of String =
(("John","76030 3"),("Paul","67 0403"),("George s","680902") )
Many thanks to all 6 6451
You can't. Constants have to be, well, constant. Arrays are not constant.
--
Randy Birch
MS MVP Visual Basic http://vbnet.mvps.org/
"sruojlim" <pa************ ***@yahoo.ca> wrote in message
news:WZ******** **********@news 20.bellglobal.c om...
: Hi everyone
: I'm posting again this question as my system was down at time of the first
: posting...well something in the newsgroups was down.
:
: I'd like to know how i should declare a constant as an array with two
: dimension. I've tried the following but seems the syntax is somehow
wrong.
: Can someone help me in doing so or any clue would be fully appreciate.
:
: Here is my bugged code:
:
: Const TableDOB(1..3,1 ..2) of String =
: (("John","76030 3"),("Paul","67 0403"),("George s","680902") )
:
:
: Many thanks to all
:
:
:
sruojlim schreef: Hi everyone I'm posting again this question as my system was down at time of the first posting...well something in the newsgroups was down.
I'd like to know how i should declare a constant as an array with two dimension. I've tried the following but seems the syntax is somehow wrong. Can someone help me in doing so or any clue would be fully appreciate.
Here is my bugged code:
Const TableDOB(1..3,1 ..2) of String = (("John","76030 3"),("Paul","67 0403"),("George s","680902") )
Many thanks to all
There is no such thing as a "array constant" in Visual Basic. Simply use
a variable and use it member by member. If you really want to do it all
in one statement you can use the Array function, like:
Array(Array("Jo hn","760303") , Array("Paul","6 70403"),
Array("Georges" ,"680902"))
But it's not what I would call readable code.
Best regards
Thank you and really sorry for this galaxy like delay
jm
"Randy Birch" <rg************ @mvps.org> a écrit dans le message de news: 2I************* *******@rogers. com... You can't. Constants have to be, well, constant. Arrays are not constant.
--
Randy Birch MS MVP Visual Basic http://vbnet.mvps.org/
"sruojlim" <pa************ ***@yahoo.ca> wrote in message news:WZ******** **********@news 20.bellglobal.c om... : Hi everyone : I'm posting again this question as my system was down at time of the first : posting...well something in the newsgroups was down. : : I'd like to know how i should declare a constant as an array with two : dimension. I've tried the following but seems the syntax is somehow wrong. : Can someone help me in doing so or any clue would be fully appreciate. : : Here is my bugged code: : : Const TableDOB(1..3,1 ..2) of String = : (("John","76030 3"),("Paul","67 0403"),("George s","680902") ) : : : Many thanks to all : : :
Thank you and really sorry for this galaxy like delay
jm
"Randy Birch" <rg************ @mvps.org> a écrit dans le message de news: 2I************* *******@rogers. com... You can't. Constants have to be, well, constant. Arrays are not constant.
--
Randy Birch MS MVP Visual Basic http://vbnet.mvps.org/
"sruojlim" <pa************ ***@yahoo.ca> wrote in message news:WZ******** **********@news 20.bellglobal.c om... : Hi everyone : I'm posting again this question as my system was down at time of the first : posting...well something in the newsgroups was down. : : I'd like to know how i should declare a constant as an array with two : dimension. I've tried the following but seems the syntax is somehow wrong. : Can someone help me in doing so or any clue would be fully appreciate. : : Here is my bugged code: : : Const TableDOB(1..3,1 ..2) of String = : (("John","76030 3"),("Paul","67 0403"),("George s","680902") ) : : : Many thanks to all : : :
Thank you for answering...I know, i'm a "little" late, well maybe more like
galaxies ago.
jm
"Dikkie Dik" <Ab***@SpamBust ers.com> a écrit dans le message de news:
yF************* @newsfe01.lga.. . sruojlim schreef: Hi everyone I'm posting again this question as my system was down at time of the first posting...well something in the newsgroups was down.
I'd like to know how i should declare a constant as an array with two dimension. I've tried the following but seems the syntax is somehow wrong. Can someone help me in doing so or any clue would be fully appreciate.
Here is my bugged code:
Const TableDOB(1..3,1 ..2) of String = (("John","76030 3"),("Paul","67 0403"),("George s","680902") )
Many thanks to all There is no such thing as a "array constant" in Visual Basic. Simply use a variable and use it member by member. If you really want to do it all in one statement you can use the Array function, like:
Array(Array("Jo hn","760303") , Array("Paul","6 70403"), Array("Georges" ,"680902"))
But it's not what I would call readable code.
Best regards
Thank you for answering...I know, i'm a "little" late, well maybe more like
galaxies ago.
jm
"Dikkie Dik" <Ab***@SpamBust ers.com> a écrit dans le message de news:
yF************* @newsfe01.lga.. . sruojlim schreef: Hi everyone I'm posting again this question as my system was down at time of the first posting...well something in the newsgroups was down.
I'd like to know how i should declare a constant as an array with two dimension. I've tried the following but seems the syntax is somehow wrong. Can someone help me in doing so or any clue would be fully appreciate.
Here is my bugged code:
Const TableDOB(1..3,1 ..2) of String = (("John","76030 3"),("Paul","67 0403"),("George s","680902") )
Many thanks to all There is no such thing as a "array constant" in Visual Basic. Simply use a variable and use it member by member. If you really want to do it all in one statement you can use the Array function, like:
Array(Array("Jo hn","760303") , Array("Paul","6 70403"), Array("Georges" ,"680902"))
But it's not what I would call readable code.
Best regards This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Scotter |
last post by:
Please forgive me for reposting; last title didn't quite say it right.
I have an ASP application I wrote in vbScript so this is not .Net.
There are 20 nearly identical versions of this application running on my
2003 server.
It is a web content management system.
My idea is to drop some of the common functions into a DLL to increase
efficiency AND to protect the source code so I can start selling this thing
and letting others run it on...
|
by: Dirk Försterling |
last post by:
Hi,
sorry for reposting, but it seems my message just hit nothing
but air. If I posted to the wrong list or did something else
wrong with the message, please let me know.
I really want to know what's going on but still found nothing.
I do not know when and where the statements are produced that
lead to the error messages. It seems they were generated by
postgres internally but I cannot see when and why. How can
|
by: John Welch |
last post by:
Sometimes I post a question here and someone answers it quickly with an
answer like "well, I don't know much about this, but maybe such and such."
While I completely appreciate their effort, I might not get the answer I
need because then everyone else sees the thread as answered and leaves it
alone, and it drops down toward the bottom of the list. Is it ok to repost
the question in this situation? Or is there some way to mark a question as...
|
by: AMeador |
last post by:
I have a form that should come up blank (no data in the text boxes,
etc...). I want the user to be able to fill in the contols on the form
and then save the data to a SQL Server database. My plan up to this
point is to use a dataset and have it bound to the controls in the
form. I want to do this so I can take advantage of Undoing changes
easily. The problem is I don't know how to deal with the dataset when
an initial record hasn't been...
|
by: Ersin Gençtürk |
last post by:
Hi , I know that this is something belongs to IE but , I think sometimes
asp.net developers encounter this problem.
Sometimes we need to repost another asp.net page but IE is opening a page
that "The page cannot be refreshed without resending the information.Click
retry to send the information again,or click cancel to return to the page
tahat you ware trying to view."
I think you understand what the problem is.Any workarounds or ideas...
| |
by: rebeccatre |
last post by:
hi can Variant archiving setTimout('.. capability be done without
using it? :-)
|
by: Stefano Sabatini |
last post by:
Hi all, I'm encountering this while trying to implement a factory
singleton method to generate objects.
The singleton has a static map which binds a static creation function
defined in each class to the type of the object to be created.
Here it is the code, which is a modification of the wikipedia C++
factory example code:
----------------------------------8<--------------------------------
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
| |
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |