IDL syntax error caused by getenv(), a path error - idl

I am using exofast code in IDL, I set environment exactly as the developer describe it but when I ru the code for fitting I get this errors:
path = filepath('',root_dir=getenv('EXOFAST_PATH'),subdir=['examples','hat3'])
^
% Syntax error.
At: /usr/local/ITTVIS.IDL.v7.0.6.LINUX-TBE/idl706/EXOFASTv2/examples/hat3/fithat3.pro, Line 3
prefix=path+'fitresults'+path_sep() +'HAT-3b.Torres.', maxsteps=maxsteps, $
^
% Syntax error.
At: /usr/local/ITTVIS.IDL.v7.0.6.LINUX-TBE/idl706/EXOFASTv2/examples/hat3/fithat3.pro, Line 8
I don't know what is the problem in my environment. any help?

Related

Syntax error caused by using different version of IDL

I am new in IDL. When I use IDL version 8, my program run successfully. But when I use IDL Version 7.1 I get a syntax error that you can see below.
How can I fix this issue?
IDL> .com schwmodfirstiter_box.pro
str +=pars[i].name+strn(p[i],format='('+pars[i].sformat+')')
^
% Syntax error.
At: /home/behzad/schwmodfirstiter_box.pro, Line 5
% 1 Compilation error(s) in module SCHMAKEPARSTRING.
str +=pars[i].name+strn(p[i],format='('+pars[i].sformat+')')
^
% Syntax error.
At: /home/behzad/schwmodfirstiter_box.pro, Line 14
% 1 Compilation error(s) in module SCHMAKEPARSTRING0.
mlstr=pars[0].name+strn(ml[k],format='('+pars[0].sformat+')')+'/'
^
% Syntax error.
At: /home/behzad/schwmodfirstiter_box.pro, Line 63
% 1 Compilation error(s) in module SCHMAKEMODEL.
% Compiled module: SUBMITORBLIB.
% Compiled module: COMPILENNLS.
% Compiled module: SCHWMODFIRSTITER.
IDL>
% Interrupt encountered.
strn.pro is not part of IDL but is likely from
https://idlastro.gsfc.nasa.gov/ftp/pro/misc/strn.pro
Make sure you have this procedure in your !Path and can compile it.

Error in source() unexpected numeric constant

when I write an R script in a test.R file
nb <- 22
paste("Etudions le nombre: ",nb)
paste("Le logarithme népérien de ce nombre est: ", log(nb))
paste("La racine carrée de ce nombre est: ", sqrt(nb))
paste("Le cosinus de ce nombre est: ", cos(nb))
paste("Si on ajoute 3 au nombre ", nb, " on obtient: ", nb + 3)
q("ask")
I executed using :
source("/Users/shous/Desktop/Master2.0/LanguageR/test.R")
error message :
Error in source("/Users/shous/Desktop/Master2.0/LanguageR/test.R") :
/Users/shous/Desktop/Master2.0/LanguageR/test.R:1:9: unexpected numeric constant
1: nb <- 22
It can be encoding problem: unexpected numeric constant 1: nb <- 22
I guess you don't want to have this character Â.Try to change file encoding or rewrite problematic line (not copy paste).
unexpected numeric constant 1: nb <- 22
This is R telling you that it found the line
nb <- 22
and that isn't valid syntax. You can duplicate this simply on the command line with something like a = a 22, which also isn't valid syntax. You need to correct that line of code - I don't know what you want it to be, perhaps there is a missing line break, or perhaps it should be  + 22 or Â[22], etc...
The line that produces the error does not occur in the code you show, perhaps you should make sure you are running the right file.

sqlcipher on windows using cygwin

I am using this site here. http://retroshare.sourceforge.net/wiki/index.php/Win32CompileLibrariesMingw#Compile_OpenSSL
and I have come across a problem. The error is
In file included from /usr/include/w32api/windows.h:95:0, from sqlite3.c:9607:
/cygdrive/c/sqlcipher-2.2.0/../openssl-1.0.1c/include/openssl/ossl_typ.h:153:29: error: expected ‘)’ before numeric constant typedef struct X509_name_st X509_NAME;
/cygdrive/c/sqlcipher-2.2.0/../openssl-1.0.1c/include/openssl/ossl_typ.h:199:33: error: expected ‘)’ before numeric constant typedef struct ocsp_response_st OCSP_RESPONSE;
Makefile:573: recipe for target 'sqlite3.lo' failed
make: *** [sqlite3.lo] Error 1
I opened the ossl_typ.h file to find only 1 line in it so i am not able to trace the error. Thank you for your help!
I came across the same problem trying to build sqlcipher. The problem is that recent versions of minGW define X509_NAME and OCSP_RESPONSE.
You need to add CFLAGS="-DNOCRYPT" to your ./configure, e.g. ./configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC -DSQLITE_TEMP_STORE=2 -DNOCRYPT -lcrypto" in order to tell the compiler not to define these constants first.
Here is a link that explain the problem : http://cygwin.com/ml/cygwin/2012-12/msg00194.html

Warning whitelist doesn't work in Google closure compiler

The manual says I can use:
--warnings_whitelist_file VAL : A file containing warnings to
suppress. Each line should be of the
form
<file-name>:<line-number>? <warning-d
escription>
This is what my whitelist looks like:
ef-utils.js:1 Redeclared variable: ef
ef-utils.js:1 Variable ef first declared in externs-ko.js
ef-validation.js:1 Redeclared variable: ef
ef-validation.js:1 Variable ef first declared in externs-ko.js
And I am still getting warnings while compiling:
ef-utils.js:1: WARNING - Redeclared variable: ef
?var ef = (function (ns, ko) {
^
ef-utils.js:1: WARNING - Variable ef first declared in externs-ko.js
?var ef = (function (ns, ko) {
^
ef-validation.js:1: WARNING - Redeclared variable: ef
?var ef = (function (ns, ko) {
^
ef-validation.js:1: WARNING - Variable ef first declared in externs-ko.js
?var ef = (function (ns, ko) {
^
I just toyed around with the current WhitelistWarningsGuard. I found out that
Line numbers are completely ignored: they are stripped both from the input file and the encountered warnings.
File names are formatted as they are for output, i.e. as they occur on the command line.
There is a colon after the file name, followed by two spaces, followed by the message text without indicator of the severity (WARNING, ERROR).
The main effect of the whitelist appears to be turning errors into warnings. So when applied to warnings, there will be no effect at all.
The WhitelistBuilder mentioned by Tibos is there in the code, but I see no way to use it from the command line.
As it is, that feature appears to be mostly useless for my use cases…
You should use the WhitelistBuilder to build the whitelist file. From the looks of it, you need absolute paths to the files, not relative.
As MvG correctly stated as this flag is implemented it's useless. Though, with pretty light changes to the compiler's code it can be turned to what we all expect from it: suppressing errors and warnings we don't want to see.
See details here: Suppressing or resolving compiler errors in goog.base

flex builder new projects with syntax errors

I'm a junior developer and I'm having some problems with my Flex Builder 3. Every time I make a new project, Flex Builder detects syntax errors like:
1084: Syntax error: expecting rightbracket before leftbrace. FotoBeheer line 23
1084: Syntax error: expecting rightbracket before public. FotoBeheer line 22
1084: Syntax error: expecting rightparen before s. DomoticaSystem line 16
1093: Syntax error. DomoticaSystem line 16
Nevertheless, Fotobeheer will run, but any other program won't even start. Does anybody have any ideas how to solve this problem?
This is indicitive of syntax problems at or before the first line of error. Extra brackets or parenthesis are the typical culprit.

Resources