AnsweredAssumed Answered

DDE - Decimal point.

Question asked by VRFuser on Jul 18, 1996
>
> Can anyone tell me how to convert VEE decimal point (.) to European
> decimal point (,)?
>
> This causes us problems upon transferring values from VEE to Excel.
>
> Best regards
> Svein
>

I suppose if nothing else you could always write a small function
that interchanges "." and ",". Perhaps call is "swapRadix". Then
use this whenever you want to convert from one system to the other.
Crude example shown below. You would of course want to make this a
function so that you could use it wherever you need to.

Stan Bischof
stanb@sr.hp.com


#! c:locappsvee312/vee -r
(revision "1.2")
(date "Thu 18/Jul/1996")
(component 0 "ROOTCONTEXT"
(implementation
  (component 0 "CONTEXT"
   (name "swapRadix")
   (interface
    (sequence in)
    (sequence out)
    (input 1
     (name "A")
     (optional yes)
    )
    (output 1
     (type data)
     (name "X")
     (lock constraints)
     (optional yes)
    )
   )
   (implementation
    (locked no)
    (trigMode deg)
    (nextID 7)
    (component 0 "TOSTRING"
     (interface
      (sequence in)
      (sequence out)
      (input 1
       (name "A")
       (optional yes)
      )
      (output 1
       (name "result")
       (lock name constraints)
      )
     )
     (implementation
      (attr iopath string write "string"
       (readTerm "
")
       (fs " ")
       (eol "
")
       (multiField fullSyntax)
       (arrayFormat block)
      )
      (procedure
        WRITE TEXT a EOL
      )
     )
     (views
      (icon
       (origin 159 212)
       (extent 63 16)
      )
      (detail
       (origin 23 181)
       (extent 254 78)
      )
      (terminals on)
      (active icon)
     )
    )
    (component 1 "FORCOUNT"
     (interface
      (sequence in)
      (sequence out)
      (input 1
       (name "Count")
       (tag "Count")
       (requires
        (datatype Int32)
        (shape "Scalar")
       )
       (lock constraints)
       (optional yes)
       (buffer YES)
      )
      (output 1
       (name "Count")
       (lock name constraints)
      )
     )
     (implementation
      (component count 14)
     )
     (views
      (icon
       (origin 325 134)
       (extent 70 52)
       (iconImage "loop.icn")
      )
      (detail
       (origin 267 144)
       (extent 106 32)
      )
      (active icon)
     )
    )
    (component 2 "FORMULA"
     (name "strLen(str)")
     (subType "strLen")
     (interface
      (sequence in)
      (sequence out)
      (input 1
       (name "str")
       (optional yes)
      )
      (output 1
       (name "Result")
       (lock name constraints)
      )
     )
     (implementation
      (component expr 1 "strLen(str)")
     )
     (views
      (icon
       (origin 224 162)
       (extent 72 16)
      )
      (detail
       (origin 220 274)
       (extent 100 32)
      )
      (terminals on)
      (active icon)
     )
    )
    (component 4 "ACCUMULATOR"
     (interface
      (sequence in)
      (sequence out)
      (input 1
       (name "Data")
       (tag "InData")
       (requires
        (shape "Scalar")
       )
       (lock name constraints)
      )
      (output 1
       (name "Data")
       (tag "accumData")
       (lock name constraints)
      )
     )
     (implementation
      (component clearAtPrerun 1)
      (component clearAtActivate 1)
     )
     (views
      (icon
       (origin 448 232)
       (extent 85 16)
      )
      (detail
       (origin 430 224)
       (extent 121 32)
      )
      (active icon)
     )
    )
    (component 5 "FORMULA"
     (name "getChar")
     (interface
      (sequence in)
      (sequence out)
      (input 1
       (name "n")
       (optional yes)
      )
      (input 2
       (name "A")
       (optional yes)
      )
      (output 1
       (name "Result")
       (lock name constraints)
      )
     )
     (implementation
      (component expr 1 "strFromThru(a, n, n)")
     )
     (views
      (icon
       (origin 272 228)
       (extent 56 25)
      )
      (detail
       (origin 209 229)
       (extent 163 42)
      )
      (terminals on)
      (active icon)
     )
    )
    (component 6 "FORMULA"
     (name "exchange")
     (interface
      (sequence in)
      (sequence out)
      (input 1
       (name "A")
       (optional yes)
      )
      (output 1
       (name "Result")
       (lock name constraints)
      )
     )
     (implementation
      (component expr 1 "(a=="," OR a=="." ? (a=="," ? "." : ",") : a)")
     )
     (views
      (icon
       (origin 347 232)
       (extent 67 16)
      )
      (detail
       (origin 206 314)
       (extent 289 32)
      )
      (terminals on)
      (active icon)
     )
    )
    (configuration
     (connect I1:1 D0:1)
     (connect D2:1 D1:1)
     (connect D0:1 D2:1)
     (connect D5:1 D3:1)
     (connect D1:1 D4:1)
     (connect D0:1 D4:2)
     (connect D4:1 D5:1)
     (connect D3:1 O1:1)
    )
   )
   (views
    (icon
     (origin 294 212)
     (extent 73 16)
    )
    (detail
     (origin 103 82)
     (extent 454 297)
     (configuration
      (connect I1:1 D0:1
       (Point 103 230)
       (Point 150 230)
       (Point 150 220)
       (Point 156 220)
      )
      (connect D2:1 D1:1
       (Point 298 170)
       (Point 310 170)
       (Point 310 160)
       (Point 322 160)
      )
      (connect D0:1 D2:1
       (Point 224 220)
       (Point 230 220)
       (Point 230 200)
       (Point 210 200)
       (Point 210 170)
       (Point 221 170)
      )
      (connect D5:1 D3:1
       (Point 416 240)
       (Point 445 240)
      )
      (connect D1:1 D4:1
       (Point 397 160)
       (Point 420 160)
       (Point 420 210)
       (Point 260 210)
       (Point 260 230)
       (Point 269 230)
      )
      (connect D0:1 D4:2
       (Point 224 220)
       (Point 240 220)
       (Point 240 250)
       (Point 269 250)
      )
      (connect D4:1 D5:1
       (Point 330 240)
       (Point 344 240)
      )
      (connect D3:1 O1:1
       (Point 535 240)
       (Point 550 240)
       (Point 550 230)
       (Point 556 230)
      )
     )
     (stackingOrder 0 1 2 4 5 3)
    )
    (terminals on)
    (active icon)
   )
  )
  (configuration
  )
)
(views
  (detail
   (configuration
   )
  )
)
)

Outcomes