Discussions related to Visual Prolog
-
Ferenc Nagy
- VIP Member
- Posts: 215
- Joined: 24 Apr 2007 12:26
Post
by Ferenc Nagy »
Code: Select all
clauses
iniHiLo() :-
Range_List=[
Range
||
Axis in applied_view:all_axes,
C=getCoordinate1(Axis),
Range=applied_view:range_map_fact:tryGet(Axis)=view:g(Axis,Verb,R1,R2),
/* snip */
],
next_predicate(Range_List),
What is the recommended indentation within a
[||] block? What kind of separation do you recommend for the commands before and after the
|| operator?
TIA, Regards,
Frank Nagy
-
Thomas Linder Puls
- VIP Member
- Posts: 1466
- Joined: 28 Feb 2000 0:01
Post
by Thomas Linder Puls »
I would format it like this (I corrected a little syntax error):
Code: Select all
clauses
iniHiLo() :-
Range_List =
[ Range ||
Axis in applied_view:all_axes,
C = getCoordinate1(Axis),
Range = applied_view:range_map_fact:tryGet(Axis):view:g(Axis, Verb, R1, R2),
/* snip */
],
next_predicate(Range_List),
Regards Thomas Linder Puls
PDC
-
Ferenc Nagy
- VIP Member
- Posts: 215
- Joined: 24 Apr 2007 12:26
Post
by Ferenc Nagy »
Erroneous:
Code: Select all
Range = applied_view:range_map_fact:tryGet(Axis):view:g(Axis, Verb, R1, R2),
]
Correct:
Code: Select all
Range = applied_view:range_map_fact:tryGet(Axis),
Range=view:g(Axis, Verb, R1, R2)
]
Comma is not allowed before
]
end if
end foreach.
TIA, Regards,
Frank Nagy