How to deal with this error: floating constant exponent has no digits


 
Thread Tools Search this Thread
Top Forums Programming How to deal with this error: floating constant exponent has no digits
# 1  
Old 10-24-2009
How to deal with this error: floating constant exponent has no digits

A conditional statement cause it:

if(strlen(str) < n1+1) {

-------

}
# 2  
Old 10-26-2009
Is this a compile-time or run-time error? I'm assuming run-time, and if so, that's probably because str is not a valid string somehow. Without seeing the code in context this is only a guess.
# 3  
Old 10-28-2009
Thanks

compile-time error.

for example:

int d (char *str1, char *str2, int n1, int n2, int len) {


if (strlen(str1) < n1+1en-1 || strlen(str2) < n2+len-1) { // Error ?

......................................
}

.....................................
}
# 4  
Old 10-28-2009
What version of GCC are you using? What headers are included?
This error is normally associated with hexadecimal floating constants or literals.
# 5  
Old 10-28-2009
gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-59)

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <math.h>
#include <string.h>
#include <stdarg.h>

thanks
# 6  
Old 10-28-2009
Quote:
Originally Posted by cdbug
Thanks


if (strlen(str1) < n1+1en-1 || strlen(str2) < n2+len-1) { // Error ?


}
You typed "1en" (one-e-n) instead of "len" (el-e-n).
# 7  
Old 10-29-2009
Sigh!! What an error!! But the two characters are the same in this shell.

Thanks
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

sed / awk script to delete the two digits from first 3 digits

Hi All , I am having an input file as stated below 5728 U_TOP_LOGIC/U_CM0P/core/u_cortexm0plus/u_top/u_sys/u_core/r03_q_reg_20_/Q 011 611 U_TOP_LOGIC/U_CM0P/core/u_cortexm0plus/u_top/u_sys/u_core/r04_q_reg_20_/Q 011 3486... (4 Replies)
Discussion started by: kshitij
4 Replies

2. AIX

How to deal with Tar error ?

Hello Folks, while making a tar file, got this error root@clodb:/clodbvg>/opt/freeware/bin/tar cvf - /oradata | gzip > /clodbvg/bkp_30MAY16.tgz /opt/freeware/bin/tar: Removing leading `/' from member names /oradata/ /oradata/JAVA/ /oradata/JAVA/.toc /oradata/JAVA/Java131.rte... (16 Replies)
Discussion started by: filosophizer
16 Replies

3. Shell Programming and Scripting

How to solve awk: line 1: runaway string constant error?

Hi All ! I am just trying to print bash variable in awk statement as string here is my script n=1 for file in `ls *.tk |sort -t"-" -k2n,2`; do ak=`(awk 'FNR=='$n'{print $0}' res.dat)` awk '{print "'$ak'",$0}' OFS="\t" $file n=$((n+1)) unset ak doneI am getting following error awk:... (7 Replies)
Discussion started by: Akshay Hegde
7 Replies

4. Shell Programming and Scripting

Find filenames with three digits and add zeros to make five digits

Hello all! I've looked all over the internet and this site and have come up a loss with an easy way to make a bash script to do what I want to do. I have a file with a naming convention as follows: 2012-01-18 string of words here 123.jpg 2012-01-18 string of words here 1234.jpg 2012-01-18... (2 Replies)
Discussion started by: Buzzman25
2 Replies

5. Shell Programming and Scripting

PERL- converting exponent value to floating point

Hi Friends, I've an exponent value like, $val="9.57669e-05"; I want to convert this value to floating point value in PERL scripting. I tried googling for the solution, and also asked many perl friends. Unfortunately, I didn't get answer. Could you please help me? Thanks in advance... (4 Replies)
Discussion started by: ganapati
4 Replies

6. UNIX for Dummies Questions & Answers

floating point error in linux + C

Here's a program and its pretty simple .It requires file handling and some calculations but on running it I am not getting the required result.It seems that the code outside the file read's outer while loop is not executing e.g the print statement is not being printed.Plz Help! #include<stdio.h>... (1 Reply)
Discussion started by: headrush
1 Replies

7. Programming

Floating point error in C

Hi, see the simple code below double i; i=8080.9940; printf(" val :%.30f\n",i); output i m getting is val :8080.993999999999700000000000000 when i m expecting val :8080.9940 what happens?how can i avoid it? thanks... (2 Replies)
Discussion started by: Hara
2 Replies
Login or Register to Ask a Question