Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Rewrite

Rewrite 8 months 2 weeks ago #10285

  • Gierula
  • Gierula's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 46
  • Karma: 0
cyt "Why declaring local variables as static ?

/Bruno "


Because it was in the documentation.

Object Reference Manual
-pwrb
-Plc
-DpDistribute
Last Edit: 8 months 2 weeks ago by Gierula.
The administrator has disabled public write access.

Rewrite 8 months 2 weeks ago #10286

  • brunad
  • brunad's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 222
  • Karma: 0
Ok!

Claes did it, so it's the way to do it and it means the object has to be remain from scan to scan

(I have not yet use Dpcollect, I prefer CArithm)

/Bruno
The administrator has disabled public write access.
The following user(s) said Thank You: Gierula

Rewrite 8 months 2 weeks ago #10287

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 2709
  • Thank you received: 357
  • Karma: 117
Hi Bruno,

Actually it doesn't have to remain to the next scan, but it has to remain until the DpDistribute is executed. The code in the DataArithm is surrounded by curly brackets, so declared variables will be freed at the end of the DataArithm code. If they are placed on outputs to be read by other objects they have to be declared static to still be valid when these objects are executed.

/Claes
The administrator has disabled public write access.
The following user(s) said Thank You: Gierula

Rewrite 8 months 2 weeks ago #10288

  • brunad
  • brunad's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 222
  • Karma: 0
Hello Claes,

Thank's very much, I think I got now the big picture.

/Bruno
Last Edit: 8 months 2 weeks ago by brunad.
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Time to create page: 3.652 seconds