Vedr: MI run command limitation?

2000-06-19 Thread pel


Hi Jacques

It is correct, you can not usa a Array in a run command statment.

But you dont have to use a Run Command "some string". In the exampel with
the CREATE STYLE command you can use this code, where the color is
determind by the variable f1 and f2.

I have been programming with mapbasic for 6 years and never had to use the
Run Command, i have always bean able to use a variable, therefor this
limitation is not a problem


Peter Laulund
National Survey and Cadastre, Denmark


 include "mapbasic.def"

  declare sub main

  sub main
  dim bn, i as smallint,
  brushStyle() as brush,
  f1, f2 as integer

  cls
  note "kør"

  f1 = red
  f2 = blue

  bn = 20
  Create styles
  from Brush MakeBrush(2, f1, 0)
  to   Brush MakeBrush(2, f2, 0)
  Vary Color by "RGB"
  Number bn
  into variable brushstyle

 for i = 1 to bn

   print Str$(BrushStyle(i))

 next
  end sub






"Jacques Paris" [EMAIL PROTECTED] - 2000 06 15 16:28:22

Til:[EMAIL PROTECTED]
cc:      (bcc: Peter Laulund/MI/KMS)
Vedrørende:MI run command limitation?





I would like a confirmation of my interpretation that the string used in a
RUN COMMAND cannot contained an array variable.

I encountered that apparent limitation when trying to find a solution to a
query about  the CREATE STYLE statement. The string
"Create Styles From " +LOW + " To "+HIGH +" Vary Color By ""RGB"" Into
Variable "+ BS
where LOW and HIGH are two brush variables and BS a brush dim'ed at 4
(defaut value) leads to the following message
"Cannot use an array or user-defined type in an expression"

I knew that you cannot use an array variable in the MapBasic window so I
conducted the tests by writing a small MBX.

Is my interpretation correct or what did I miss?

TIA

Jacques Paris [EMAIL PROTECTED]

Paris PC Consult (mainly MapInfo app.)
 www.total.net/~rparis/gisproducts.htm

--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]





MI run command limitation?

2000-06-15 Thread Jacques Paris

I would like a confirmation of my interpretation that the string used in a
RUN COMMAND cannot contained an array variable.

I encountered that apparent limitation when trying to find a solution to a
query about  the CREATE STYLE statement. The string
"Create Styles From " +LOW + " To "+HIGH +" Vary Color By ""RGB"" Into
Variable "+ BS
where LOW and HIGH are two brush variables and BS a brush dim'ed at 4
(defaut value) leads to the following message
"Cannot use an array or user-defined type in an expression"

I knew that you cannot use an array variable in the MapBasic window so I
conducted the tests by writing a small MBX.

Is my interpretation correct or what did I miss?

TIA

Jacques Paris [EMAIL PROTECTED]

Paris PC Consult (mainly MapInfo app.)
 www.total.net/~rparis/gisproducts.htm

--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]