Total sum of value in buffer

Home Forums Problems and solutions in GDL Others Total sum of value in buffer

Tagged: , ,

Viewing 2 reply threads
  • Author
    Posts
    • #2712
      Pavel Čapek
      Participant

      Hello,
      Is there a posibbility to get total sum of value from buffer. I imagine somethink like totalSum=sum(get(nsp)).

      Thanks for replay.
      Pavel

      Pavel Čapek
      BIM Project

    • #2719
      Joachim Sühlo
      Participant

      Isn’t it simple NSP itself, which gives you the sum?

      GDL Object Developer
      b-prisma
      MAC OSx 10.14

      • #2720
        Pavel Čapek
        Participant

        Hello Joachim,
        thanks for reply. But this is not what I mean. Maybe my example bellow will bring some clarification to what I mean.

        put 1, 2, 3, 4
        print(nsp)

        “nsp” gives me a number of values count => 4 not a sum of values => 10

        Pavel Čapek
        BIM Project

    • #2724
      Barry Kelly
      Participant

      Maybe this?

      for n = 1 to (NSP)
      	totalSum = totalSum + GET (1)
      next n
      
      print totalSum

      Barry.

      Versions 6.5 to 22
      Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
      Dell Precision M6800 - i7 4700MQ @ 2.40GHz, 16GB RAM, AMD FirePro M6100 (2GB), Windows 7 64bit

Viewing 2 reply threads
  • The forum ‘Others’ is closed to new topics and replies.