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 4856
* "Mike Wengler" <mikewenglerATp rovoxDOTcom> 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" <mikewenglerATp rovoxDOTcom> wrote in message
news:u1******** ******@TK2MSFTN GP12.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" <mikewenglerATp rovoxDOTcom> 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..plea se tell me it's just
some of that Austrian sarcasm ;-)
just use
microsoft.Visua lBasic.Val()
the microsoft.visua lbasic class has all the old VB functions and they work
exactly the same..
"Mike Wengler" <mikewenglerATp rovoxDOTcom> wrote in message
news:u1******** ******@TK2MSFTN GP12.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 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
and return values.
for example, if this were my line:
set word {World}
|
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 = 1;
var b = 2;
function sub(a, b)
{
a = a - b;
|
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 there any equivalent or
alternative to VARRAYs in DB2?
Thanks in advance,
Praveen
|
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 data that is in
this field can vary. It's a list of mechanical equipment, and how it
is designated varies based on how the customer has them labeled. For
example, a list of their equipment might look like:
CH-1
CH-2
CH-3
|
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 equivalent.
Is there such a function available in C#? I can see that VB.NET has one,
but I couldn't see how to get at it in C#.
For example, if I have ...
|
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 fetch an unknown attribute, or set any attribute
of an instance of that class?
I've looked at __defineGetter__, __defineSetter__, __lookupGetter__ and
|
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
class Double
{
private;
|
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: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |