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

TOPIC: Rewrite

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

Rewrite 1 year 4 months ago #10286

  • brunad
  • brunad's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 225
  • 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 1 year 4 months ago #10287

  • claes
  • claes's Avatar
  • NOW ONLINE
  • Platinum Boarder
  • Posts: 2784
  • Thank you received: 383
  • Karma: 118
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 1 year 4 months ago #10288

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

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

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