View Issue Details

IDProjectCategoryView StatusLast Update
0000447OpenFOAMBugpublic2012-03-21 09:13
Reporteruser357Assigned Touser4 
PrioritynormalSeverityfeatureReproducibilityhave not tried
Status resolvedResolutionno change required 
Summary0000447: Provide "=" as another way to write "#calc" in dictionaries.
DescriptionI was very glad to see the new #calc directive introduced in 2.1 as a shortcut for #codeStream, allowing great ease of use for run-time code compilation. I have been using it extensively to prepare parametric dictionaries.

I think this feature might be even nicer to use if the syntax "=" instead of "#calc" was allowed. That is to say

    c = "$a/$b";

would mean the same thing as

    c #calc "$a/$b";
TagsNo tags attached.

Activities

user4

2012-03-08 17:44

  ~0001127

Interesting idea. However the #calc is a preprocessing directive, i.e. gets evaluated at parsing time. The '=' just gets parsed as another word into the dictionary. Giving '=' another meaning would mean not being able to use it in any context.

Issue History

Date Modified Username Field Change
2012-03-02 21:05 user357 New Issue
2012-03-08 17:44 user4 Note Added: 0001127
2012-03-21 09:13 user2 Status new => resolved
2012-03-21 09:13 user2 Fixed in Version => 2.1.x
2012-03-21 09:13 user2 Resolution open => no change required
2012-03-21 09:13 user2 Assigned To => user4