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

TOPIC: Rewrite

Rewrite 4 years 11 months 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: 4 years 11 months ago by Gierula.
The administrator has disabled public write access.

Rewrite 4 years 11 months ago #10286

  • brunad
  • brunad's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 247
  • Thank you received: 48
  • Karma: 11
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 4 years 11 months ago #10287

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3177
  • Thank you received: 502
  • Karma: 133
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 4 years 11 months ago #10288

  • brunad
  • brunad's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 247
  • Thank you received: 48
  • Karma: 11
Hello Claes,

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

/Bruno
Last Edit: 4 years 11 months ago by brunad.
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Time to create page: 9.275 seconds