I inherited some code from a former employee, who was unable to cut the
umbilical cord from VB6. His code is littered with calls to VB6 functions
like Space(), String(), Left(), Mid(), Right(), Len(), Val(), etc.
I know the .Net equivalents of everything except Val().
Int32.Parse allows you to filter out characters like "$" and "," and
whitespace, but it still can't emulate the Val() function completely.
Alright, who here in this group knows the answer?
Thanks,
Mike 10 4802
* "Mike Wengler" <mikewenglerATprovoxDOTcom> scripsit: I inherited some code from a former employee, who was unable to cut the umbilical cord from VB6. His code is littered with calls to VB6 functions like Space(), String(), Left(), Mid(), Right(), Len(), Val(), etc.
I hope you don't try to replace these handy functions!
I know the .Net equivalents of everything except Val().
There is no 1:1 replacement available.
Int32.Parse allows you to filter out characters like "$" and "," and whitespace, but it still can't emulate the Val() function completely.
Why not use 'Val'? It's a VB.NET function.
--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Hi Herfried, Why not use 'Val'? It's a VB.NET function.
That is true but I think not a good answer
:-)
Cor
Cor,
* "Cor" <no*@non.com> scripsit: Why not use 'Val'? It's a VB.NET function. That is true but I think not a good answer
[Write your answer here]
--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
I think somebody forgot to fill in his mail template :-p
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:bv************@ID-208219.news.uni-berlin.de... Cor,
* "Cor" <no*@non.com> scripsit: Why not use 'Val'? It's a VB.NET function. That is true but I think not a good answer
[Write your answer here]
-- Herfried K. Wagner [MVP] <http://www.mvps.org/dotnet>
> Cor, Why not use 'Val'? It's a VB.NET function. That is true but I think not a good answer
[Write your answer here]
Why not use 'Val'? It's a function from .Net.
:-))))
Cor
Val is evil ..... Regex.Match coupled with ^\d*
"Mike Wengler" <mikewenglerATprovoxDOTcom> wrote in message
news:u1**************@TK2MSFTNGP12.phx.gbl... I inherited some code from a former employee, who was unable to cut the umbilical cord from VB6. His code is littered with calls to VB6 functions like Space(), String(), Left(), Mid(), Right(), Len(), Val(), etc.
I know the .Net equivalents of everything except Val().
Int32.Parse allows you to filter out characters like "$" and "," and whitespace, but it still can't emulate the Val() function completely.
Alright, who here in this group knows the answer?
Thanks,
Mike
Herfried:
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:bv*************@ID-208219.news.uni-berlin.de... * "Mike Wengler" <mikewenglerATprovoxDOTcom> scripsit: I inherited some code from a former employee, who was unable to cut the umbilical cord from VB6. His code is littered with calls to VB6
functions like Space(), String(), Left(), Mid(), Right(), Len(), Val(), etc.
I hope you don't try to replace these handy functions!
I know the .Net equivalents of everything except Val().
There is no 1:1 replacement available.
Int32.Parse allows you to filter out characters like "$" and "," and whitespace, but it still can't emulate the Val() function completely.
Why not use 'Val'? It's a VB.NET function.
-- Herfried K. Wagner [MVP] <http://www.mvps.org/dotnet>
You are wayyy too cool to like those functions..please tell me it's just
some of that Austrian sarcasm ;-)
just use
microsoft.VisualBasic.Val()
the microsoft.visualbasic class has all the old VB functions and they work
exactly the same..
"Mike Wengler" <mikewenglerATprovoxDOTcom> wrote in message
news:u1**************@TK2MSFTNGP12.phx.gbl... I inherited some code from a former employee, who was unable to cut the umbilical cord from VB6. His code is littered with calls to VB6 functions like Space(), String(), Left(), Mid(), Right(), Len(), Val(), etc.
I know the .Net equivalents of everything except Val().
Int32.Parse allows you to filter out characters like "$" and "," and whitespace, but it still can't emulate the Val() function completely.
Alright, who here in this group knows the answer?
Thanks,
Mike
Hi Bill,
I think it has nothing to do with sarcasme.
There seems a strange thinking with some people who think that by limiting
themself by only using the System part they are programming for the Net.
Cor
* "Cor" <no*@non.com> scripsit: I think it has nothing to do with sarcasme.
There seems a strange thinking with some people who think that by limiting themself by only using the System part they are programming for the Net.
Full ACK.
;-)
--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Phil Powell |
last post by:
I need to find a PHP equivalent to a very familiar TCL command "subst"
(see http://www.hume.com/html84/mann/subst.html ).
This command will take a string and evaluate anything TCL inside of it...
|
by: neerolyte |
last post by:
How would I pass an object variable to a function without that variable
getting changed in the function changing the variable that was passed (eg
both variables treated as one)?
<script>
var a...
|
by: Praveen |
last post by:
Hi All,
I have an application for that we used oracle 8i as the db and we have
written procedures using VARRAYs. Now, the requirement came to migrate
it on DB2 UDB. Can anyone pls tell me is...
|
by: google |
last post by:
I'm trying to implement something that would speed up data entry. I'd
like to be able to take a string, and increment ONLY the right-most
numerical characters by one. The type structure of the...
|
by: jose g. de jesus jr mcp, mcdba |
last post by:
vb.net val function
c=val(a$)+val(b$)
thanks
|
by: Alan Silver |
last post by:
Hello,
I'm converting some old VB6 code to use with ASP.NET and have come
unstuck with the Asc() function. This was used in the old VB6 code to
convert a character to its ASCII numeric...
|
by: aum |
last post by:
Hi,
Does Javascript have any equivalent to Python's __getattr__ and
__setattr__ methods?
In other words, the option to define a method of a class that gets invoked
whenever someone tries to...
|
by: cppquester |
last post by:
I got an app where a bunch of values are set before the calculation is
fired up.
I need an elegant way to check if all variables have been set.
So for example for double I am thinking
about a
...
|
by: Derek Martin |
last post by:
I'd like to know if it's possible to code something in Python which
would be equivalent to the following C:
---- debug.c ----
#include <stdio.h>
bool DEBUG;
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: lllomh |
last post by:
Define the method first
this.state = {
buttonBackgroundColor: 'green',
isBlinking: false, // A new status is added to identify whether the button is blinking or not
}
autoStart=()=>{
|
by: DJRhino |
last post by:
Was curious if anyone else was having this same issue or not....
I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: Aliciasmith |
last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
|
by: tracyyun |
last post by:
Hello everyone,
I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
|
by: Teri B |
last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course.
0ne-to-many. One course many roles.
Then I created a report based on the Course form and...
|
by: nia12 |
last post by:
Hi there,
I am very new to Access so apologies if any of this is obvious/not clear.
I am creating a data collection tool for health care employees to complete. It consists of a number of...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
| |