constant craving

Results 1 to 2 of 2

Thread: constant craving

  1. #1
    witchy Guest

    Default constant craving

    Can anyone help as I can&#039t seem to work out how to declare a variant as a const without messing up my option explicit. I.e<BR>I can&#039t go:<BR>dim const a = "foo"<BR>OR<BR>dim a<BR>const a = "bar"<BR>But can go:<BR>const a = "foobar" but get error due to option explicit, d&#039oh.<BR><BR>This all makes sense, but how do you do it? Please help

  2. #2
    Join Date
    Dec 1969

    Default RE: constant craving

    constants, by definition, are just that. constant. you can&#039t alter them at runtime, so you can&#039t use a variant as a constant. it MUST be a literal, or hard-coded value.<BR><BR>const a = foobar should be fine, unless you&#039ve defined &#039a&#039 somewhere else.<BR><BR>open up for a demo of contant initialisation. it&#039s on your system somewhere.<BR><BR>j

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts