Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added ability to use scientific notation #93

Conversation

Projects
None yet
2 participants
@MHumm
Copy link
Contributor

commented Apr 26, 2019

@@ -43,6 +43,9 @@ interface
StIdFirstSymbols = ['_', 'A'..'Z', 'a'..'z'];
StConstSymbols = ['0'..'9', 'A'..'F', 'a'..'f'];
StConstSymbols10 = ['0'..'9'];
StConstE=['E','e']; //lht+

This comment has been minimized.

Copy link
@obones

obones Apr 30, 2019

Member

The comment with the contributor name at the end should be removed

@@ -433,6 +433,7 @@ function TokenTyp(const Token: string): TTokenKind;
T1: Char;
Ci: Char;
Point: Boolean;
sci_nota:Boolean;

This comment has been minimized.

Copy link
@obones

obones Apr 30, 2019

Member

The name of this variable does not respect the coding guide. Please rename it to IsScientificNotation

for I := 1 to L1 do
begin
Ci := Token[I];
if CharInSet(Ci,StConstE) then

This comment has been minimized.

Copy link
@obones

obones Apr 30, 2019

Member

Missing space after the comma

@@ -587,7 +592,7 @@ function TJvInterpreterParser.Token: string;
F1: PChar;
I: Integer;
PrevPoint:boolean;
// PointCount: Integer;
point_occur, e_occur:Boolean;

This comment has been minimized.

Copy link
@obones

obones Apr 30, 2019

Member

Same comment about naming. Use PointOccurred and ExponentOccurred

Break;
if P[0] = '.' then
begin
if point_occur //lht£ºradix point can occur zero or one time

This comment has been minimized.

Copy link
@obones

obones Apr 30, 2019

Member

Contributor comment to be removed

if P[0] = '.' then
begin
if point_occur //lht£ºradix point can occur zero or one time
or not CharInSet(P[-1],StConstSymbols10) //lht£ºa radix point must behind a number

This comment has been minimized.

Copy link
@obones

obones Apr 30, 2019

Member

I'm pretty sure the coding style requires the "or" to be at the end of the line and that indentation is only one block (ie two spaces)

begin
if point_occur //lht£ºradix point can occur zero or one time
or not CharInSet(P[-1],StConstSymbols10) //lht£ºa radix point must behind a number
or (P[1] = '.') then

This comment has been minimized.

Copy link
@obones

obones Apr 30, 2019

Member

Same as above

else if CharInSet(P[0],StConstE) then
begin
if e_occur //lht£º only one time ,at most
or not CharInSet(P[-1],StConstSymbols10) then //lht£ºE must behind a number

This comment has been minimized.

Copy link
@obones

obones Apr 30, 2019

Member

Same as above

end
else if CharInSet(P[0],StConstE) then
begin
if e_occur //lht£º only one time ,at most

This comment has been minimized.

Copy link
@obones

obones Apr 30, 2019

Member

Same as above

end
else if CharInSet(P[0],StConstPlusSub) then
begin
if not CharInSet(P[-1],StConstE) then //lht: +/- must behind E

This comment has been minimized.

Copy link
@obones

obones Apr 30, 2019

Member

Please remove contributor comment

@MHumm

This comment has been minimized.

Copy link
Contributor Author

commented May 1, 2019

Superseded by #115

@MHumm MHumm closed this May 1, 2019

@MHumm MHumm deleted the MHumm:Mantis6545_JvInterpreterProgram_ScientificNotation branch May 1, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.