NUM(expression) syntax trouble
I'm having some troubles getting my variables defined as numbers, instead of strings. Am I setting this up correctly?
From the reference guide: Note that for the '+' operator, if both operands are numeric, then the operation will be numeric addition; otherwise, the operation will be string concatenation
GLOBAL_MAPPER_SCRIPT VERSION=1.00
From the reference guide: Note that for the '+' operator, if both operands are numeric, then the operation will be numeric addition; otherwise, the operation will be string concatenation
GLOBAL_MAPPER_SCRIPT VERSION=1.00
DEFINE_VAR NAME=VAR1 VALUE=10
DEFINE_VAR NAME=VAR2 FORMULA=NUM(VAR1)
DEFINE_VAR NAME=VAR3 FORMULA=VAR2+1
This is the output from script above
Defined variable VAR1 to value 10
Defined variable VAR2 to value 10
Defined variable VAR3 to value 101
Answers
-
I'm running v18.1 and getting 11 for VAR3. What version are you running, and if not the latest, suggest updating yours.
-
I am running v16, and I'm not sure my license supports upgrades...
-
I don't have an installation of v16 any more. Please send your first posting to Blue Marble Geographics Support (geohelp@bluemarblegeo.com). It will help if you include the build number along with the version as noted at the top of your Global Mapper window. This will ensure that the support team sees your problem. They may have a useful response for your v16.
Categories
- 12.7K All Categories
- 5.6K Features Discussion
- 342 Downloading Imagery
- 1.3K Elevation Data
- 380 Georeferencing Imagery Discussion
- 628 GM Script Language
- 53 User Scripts
- 113 GPS Features
- 414 Projection Questions
- 819 Raster Data
- 1.3K Vector Data
- 6.6K Support
- 177 Announcement and News
- 908 Bug Report
- 558 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 562 Other Discussion
- 129 GIS Data Sources
- 27 Global Mapper Showcase
- 233 How I use Global Mapper
- 107 Global Mapper Forum Website