Similar Threads:
1.bind and evaluate in Clarion 5.5
Hi
I'm would like to use evaluate and have written the following test
program.
I works only partly. The procedure AllCapsFunc are executed via
Evaluate but it does not return a value into StringVar. Why?
Hope that you can help
map
AllCapsFunc procedure(string), string
end
Person group,pre(PERS),bindable
FirstName string(20)
LastName string(20)
end
NameStr string(20)
StringVar string(20)
result string(255)
bind('FirstName',PERS:FirstName)
bind('StringVar',StringVar)
bind('SomeFunc',AllCapsFunc)
bind('NameStr',NameStr)
NameStr='jesper'
Person.FirstName = 'Jesper'
Person.LastName = 'Nielsen'
StringVar = 'peter'
result = evaluate('StringVar=SomeFunc(FirstName)')
message('3:'&clip(result))
case clip(result)
of ''
if ErrorCode()
message('Error ' & errorcode() & ' -- ' & Error())
else
message('Unknown error')
end
of '0'
message('no bind: ' & clip(StringVar))
of '1'
message('result: '& clip(StringVar))
end
return
AllCapsFunc procedure(str)
code
message('1:'&clip(str))
str=upper(str)
message('2:'&clip(str))
return(str)
Regards
Jesper
2.evaluate() implicit bound functions...?
3.Why some thing evaluate to #t when they should evaluate to false
Having some experience with Python, the following things evaluate to
False in a boolean sense:
False, None, [], 0 etc
However in scheme the following evaluate to #t when passed as a
boolean to another function:
'(), 0, etc.
leading to extra typing such as
(if (not (null? x)) (do-when-list-has-stuff) (do-when-list-is-empty))
or
(if (zero? x) (do-false-thing) (do-true-thing))
when it seems more natural to me to do:
(if x (do-true-thing) (do-false-thing)) where x can be a null list and
works "like python" , since that is more familiar to me.
How/why? Is it un-idiomatic or un-scheme-y to write some function
bool which returns #f when passed 0, empty list, etc?
thanks
Michael
4.in iwidgets ,tabnotebook, will tcl evaluate the entire code when it runs or it will evaluate
hi i am using iwidgets ,tabnotebook .In tabwindow suppose there r 5
pages,
so will tcl evaluate the entire code when it runs or it will evaluate
that code which page is selected
eg
for tab page1
1)i have entry and button
for tab page2
1)i have label and text
and so on
now page1 is selected
so when i run this tcl file will it make in background the label and
text or it will make only when page 2 is selected
thanks
regards harish
5.Binding or not binding
Hello,
Could you please first excuse me if my past and maybe future posting in this
group were (will be) sometimes awkward. But I will really like to be more
active using and promoting Ada.
I was really interested by the thread about "How come Ada isn't more popular?"
I would like to have your opinion about the best way to go in the future,
and in particular if binding a C library is really the way to go.
When we talk about reuse does it mean reusing the libraries done in an other
language ?
Re-implementing zlib in Ada for example. Is it a waist of time ?
How to choose ? where to start writing in Ada ?
If I need some compression lib like jpeg2k for example which way to go ?
I would love to be able to manipulate some DICOM image format in Ada for
example. Most of the actual project implementing the DICOM standard are in
C++ and java. Is it only a question of money (project funding) ?
Thanks for your feedback in the professional and the hobbyist side.
--
Ali
6. register-groups-bind binds to simple arrays
7. apply vs destructuring-bind vs multiple-value-bind
8. binding canvas item versus binding canvas widget