Please Help: dynamic statement

  • Thread starter Thread starter A Jafarpour
  • Start date Start date
You learned 1 + 1 = 10 at the beginning of your time at school?!

Yes. Although they don't do it now, we used to learn Binary, Octal and
Hexadecimal when I was at school.
 
* "Mick Doherty said:
Yes. Although they don't do it now, we used to learn Binary, Octal and
Hexadecimal when I was at school.

We learned it at school too, but it was not the first thing we learned
in mathematics.
 
* "Cor said:
Herfried, wait till you are a little more grown up, you will learn that
there is not only 1 + 1 = 2. When you are in the class where your teacher
learn you multiplying, then you will see that 1+1 is not always 2.

Some pupils will say that it's 0.532423. They will get a bad mark.
Too there are other language, like the old Latin that you maybe once will
learn, they had other figurs, they wrote I + I = II, we know that it is
difficult for you, but once when you are older, you will see that there is
more in the world than 1+1=2.

I know that. I am studying computer science for more than 3 years now,
I don't go to school.
Now you have learned that 1+1=2 you think you know everything, but there is
a lot more to learn. I think that Mick maybe can tell you what he did mean
with 1+1 is 10 because I cannot right find the sentences to explain you
that.

It depends on the context. In the context of school (at the beginning)
only 2 is accepted as the correct solution.

In the context of newsgroups, only well-quoted post are welcome.
Did you been with your daddy all once in that riesenrad or are you still to
young for that?

I live in Vienna, but I never was in the "Riesenrad". Have you been
there?

SCNR
 
We learned it at school too, but it was not the first thing we learned
in mathematics.
So how did that Abacus work if it was not a Binary representation of
Decimal.
Just because you didn't understand it, doesn't mean it wasn't so.
 
Fergus, thanks for your kind reply. By statement I meant
any general statement: any meaningful piece of vb.net
code. From all the feed back I have received so far it
seems using script control is the way to go but I have to
do some trial & error to see to what extent the evaluation
can do the job.

I am a bit surprised, vb being such rich lang. lacks a
direct and easy way of evaluating dynamic variables on the
fly - my hope was to find some sort of general function in
a form of eval(myStatement) - it is a pitty in a sense.

Thanks anyway,

Sincerely

A Jafarpour
 
Hi Herfried, thanks a lot. The urls you provided are very
helpful and I am going to try & error! a number of the
techniques discussed there.

Regards

A Jafarpour

P.S. feel a kind of sorry that some of the replies to my
post talked about everything except a solution! Didn't
know my post would result in such long arguments among
folks!
 
* "A Jafarpour said:
Hi Herfried, thanks a lot. The urls you provided are very
helpful and I am going to try & error! a number of the
techniques discussed there.

I hope you will find a solution to your problem.
P.S. feel a kind of sorry that some of the replies to my
post talked about everything except a solution! Didn't
know my post would result in such long arguments among
folks!

You don't need to feel sorry.

:-)
 
Hi A,

In one sense I agree with you. I once did so strongly.

When I first started learning VB.NET I was used to using eval in
Javascript which I thought was wonderful. That hasn't been in Basic for a long
time. I looked eagerly for the .NET equivalent and found it missing. Now that
I know a lot more than I did then, I know why.

The problem is that it's <not> missing. In fact there are now more
facilities within .NET than I've ever seen made available to create and build
code dynamically. Source code - particle by particle, object code - IL
instruction by instruction, source code in chunks and then compiled. Dynamic
loading of assemblies, etc, etc. There's tremendous flexibilty.

The price for flexibility, as so often, is complexity. More setup, more
options, more associated objects.

The difficulty I have come to understand, is that VB.NET is far beyond the
Basic of old with its globals and subs. Now that we're dealing with classes
and objects and assemblies, etc. Any scripting solution needs to be able to
cope with it all. "2 + 3" needs a context built around it. "2 + Foo" needs to
know where Foo comes from. How does the script access your objects and
classes?

The reason I answered your question is that this is an area that has my
interest. My current project is, in fact, an expression evaluator - a simple
calculator and a not-so simple one. It will only do arithmetic (but allows
passed in variables).

But for a long time I've wanted to get more into the .NET side of these
things. I just need an excuse to raise its priority. You could help here. I
don't want to go the ActveX scripting component route - I want to use VSA
which encompasses the .NET scripting engines.

If you can work with me to let me know what you'd want in the way of
'eval', I will investigate and teach it to you. This might seem like doing a
lot for you, and maybe so, but as I say, this is an area that I want to
understand, and have done a fair bit of pottering around in, but keep getting
sidetracked from.

What do you say?

Regards,
Fergus
 
actually i can prove algebraically that 1 + 1 != 2 AND that 1 != 1...just to
spite the teachers.

;^)


| * "Cor" <[email protected]> scripsit:
| >> Even if people here can read it, they don't understand the content
| >> *shock*.
| >
| > Maybe they do, but they don't agree with it, that is the hard thing
from
| > progress and when you want to go in the inovation business, will be
| > confronted with many times.
|
| I remember the teacher at school telling us:
|
| 1 + 1 = 2
|
| Most people agreed. Those who didn't agree left the school or got a bad
| mark. It was their choice to learn or to stay stupid.
|
| > And sometimes you will see, that you're the one who took the wrong
| > conclussion and did learn from it.
|
| "Homo sum; humani nihil a me alienum puto."
| (Cicero, Terenz)
|
| > This last I said without any connection to the topic now, because in
this
| > topic I don't think there is a right or wrong.
|
| :-)
|
| --
| Herfried K. Wagner
| MVP · VB Classic, VB.NET
| <http://www.mvps.org/dotnet>
 
and I can provide many instances where one is not the same as itself, psychologically.

;-)
 
rofl !!!


| and I can provide many instances where one is not the same as itself,
psychologically.
|
| ;-)
|
|
 
* "Fergus Cooney said:
and I can provide many instances where one is not the same
as itself, psychologically.

.... but this is not a group about psychology. It's a technical group.
 
Back
Top