473,320 Members | 1,832 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Scientific Notation

Hi,

I would like to prevent Visual Studio .Net from automatically converting
1e3 to 1000 in my source code.

Is there a way to do this without turning off any other automatic
formating features?

Thanks in advance,

Luis

*** Sent via Developersdex http://www.developersdex.com ***
Nov 21 '05 #1
5 3717
"Luis Ferrao" <lf*@undisclosed.com> schrieb:
I would like to prevent Visual Studio .Net from automatically converting
1e3 to 1000 in my source code.

Is there a way to do this without turning off any other automatic
formating features?


AFAIK there is no way to turn off this particular feature without turning
off other valuable features of the IDE too.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #2
Luis Ferrao wrote:
Hi,

I would like to prevent Visual Studio .Net from automatically converting
1e3 to 1000 in my source code.

Is there a way to do this without turning off any other automatic
formating features?

Thanks in advance,

Luis

*** Sent via Developersdex http://www.developersdex.com ***

Could you not use the format command to specify the number of trailing
digits?

--

Daniel
MCSE, MCP+I, MCP in Windows 2000/NT

--------------------------------------
remove the 2nd madrid from my mail address to contact me.
Nov 21 '05 #3
"Daniel" <da****@madridmadridsoleado.com> schrieb:
I would like to prevent Visual Studio .Net from automatically converting
1e3 to 1000 in my source code.

Is there a way to do this without turning off any other automatic
formating features?
[...]

Could you not use the format command to specify the number of trailing
digits?


I assume that the OP is referring to numeric literals placed directly in the
source code.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #4
Yes i'm talking about the numbers as i type them in visual studio's text
editor.

In C# if i type 1e3 it stays that way but in VB 1e3 turns into 1000.0

Isn't there a way to configure the formating rules?

*** Sent via Developersdex http://www.developersdex.com ***
Nov 21 '05 #5
On Thu, 07 Jul 2005 03:26:50 -0700, Luis Ferrao wrote:
Yes i'm talking about the numbers as i type them in visual studio's text
editor.

In C# if i type 1e3 it stays that way but in VB 1e3 turns into 1000.0

Isn't there a way to configure the formating rules?

Tools / Options / Text Editor / Basic / VB Specific
Unselect "Pretty listing (reformatting) of code"

You will lose the other functions of pretty listing:
* Align your code to the correct tab position
* Recase keywords, variables, and objects to the correct case
* Add a missing Then to an If...Then statement
* Add parenthesis to function calls
* Add missing end quotes to strings
* Reformat exponential notation
* Reformat dates

And if you ever type control-K control-D to force it to reformat, it will
change 1e3 to 1000.0 at that time too.

You could always do something like this:

Dim N as Single = "1e3"

and let the implicit CSng() happen. I believe when compiled it would
optimize the same. Even if not, it's a pretty small penalty.
Nov 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Woodster | last post by:
I am using the std::setprecision function to format variables of type double in a string however I am unsure how to stop this appearing in scientific notation. For example std::stringstream...
1
by: masoud bayan | last post by:
I have some values in type of double such 0.00009 , 0.0000007, when I want to show them in a text box and convert them to string they are changed to scientific notation while I want to show them as...
1
by: Nick | last post by:
Well, the project I am working on has now come to a screeching halt! I have been developing a program that heavily utilizes ADO.NET record sets. To generate reports, I convert the recordset to XML,...
0
by: Greg | last post by:
I am working on an application that requires working with numbers in scientific notation. I am using SqlServer as the database and I have created strongly typed data adapters and datasets. The...
7
by: Dustan | last post by:
How can I get a number into scientific notation? I have a preference for the format '1 E 50' (as an example), but if it's well known, it works.
2
by: Ryan Liu | last post by:
In C#, for a large float (9 digitals), how can I disable Scientific notation. When it auto convert to Scientific notation, I lost accuracy. Thanks a lot! Ryan
9
by: Joe Attardi | last post by:
Hi all, Math is not my strongest area so forgive me if I use some of the wrong terminology. It seems that scientific notation is immune to rounding errors. For example: (4.98 * 100) + 5.51 ...
2
by: rSmoke | last post by:
I have a DataSet that contains a table with about 6 columns of high accuracy decimal values. When I try to write out the DataSet using the WriteXML() function the XML is written fine, but the...
7
by: grinder | last post by:
I have a program that fits a line to data points. The question is: can 'C' understand scientific notation (as below) , and if not what can i do to make it work.. 0.000 0.3231E+02 0.0000E+00 ...
2
by: Greg | last post by:
I am working on an application that requires working with numbers in scientific notation. I am using SqlServer as the database and I have created strongly typed data adapters and datasets. The...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.