Message Boards Message Boards

GROUPS:

Other procedures to Do[] something once?

Posted 9 months ago
1064 Views
|
1 Reply
|
2 Total Likes
|

Are there other ways to Do something once without additional overhead? Here's a short example, but I have instances with dozens of lines of code.

If[overwriteBrightBandsPlot,
  Do[
   Export[brightBandsPlotPNGfile, LPXH2];
   Print["Wrote LPXH2 to ", brightBandsPlotPNGfile];
   Print[];
   {},
   1]
  ];

I see that Block and Module support a procedure but they also create Temporary entities.

If[overwriteBrightBandsPlot,
 Export[brightBandsPlotPNGfile, LPXH2];
 Print["Wrote LPXH2 to ", brightBandsPlotPNGfile];
 Print[];
];

Should work as you thinkā€¦

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract