sintax error?

tcl

    Next

  • 1. Anyone see the New Apple/Intel Presentation?
    Man, I will tell you, Apple seems to have their stuff together! The new Intel equipment in combination with OSX is pretty amazing. And Microsoft commited to an additional 5 year deal to support Office on Mac (BTW - 5 years is nothing). Does anyone know if Tcl is going to support the new combination (intel/OSX) natively? Currently legacy applications have to pass though something called rosetta to be able to run on the Intel base. I still think that Apple needs to get off their duff and just license the OSX to someone like Dell/Gateway. Dave
  • 2. Problems compiling TCL\TK 8.4.12 on 64 bit
    Hello all, I have downloaded the source files for TCL/TK 8.4.12 and am attempting to compile them on an HP xw9300 with an AMD Opteron running Windows XP 64. I am using Visual Studio 2003.net and the Microsoft Platform SDK for Windows Server 2003 SP1. When I open a window for the IA64 build environment and attempt to compile the code using: nmake /f makefile.vc MACHINE=IA64, I get many warnings and errors and the compilation fails. Seems as if the compiler switches have changed a good bit from VS 6.0. Any ideas or pointers? Thanks, Ben Bailey Raytheon XXXX@XXXXX.COM
  • 3. local variables and fileevent script
    I usually put the complete fileevent script into a single procedure and install it with fileevent $fd readable [list foo $local_var] --------------------------------------------------------------- Rolf Schroedter, German Aerospace Center Remove .nospam to reply: mailto: XXXX@XXXXX.COM

sintax error?

Postby sunos.x86@gmail.com » Wed, 27 Jul 2005 02:45:17 GMT

Hello all..
 I'm having a strange problem, that i guess you will know the answer
quickly...
 I'm writing a expect script, and i will use some procedures that David
L. Fisher has wrote (send_expect, send_expect_init, send_only and
send_expect_report). When i try to "source" that procedures, three of
them works fine, but the send_expect procedure, gives me errors...
 The question is:
 "What can make a procedure be executed when we are sourcing it?"
 I have put the four procedures in one file, and the last line is "puts
test...", and when i try to execute the program, i did receive the same
error... about a global variable that does not exists. I think that is
a logical error, that should appears just in the execution...
 Sorry by the english...
 Thanks.


Re: sintax error?

Postby Kevin Kenny » Wed, 27 Jul 2005 19:18:09 GMT


   The question is:

The answer is:
   There is an extra } somewhere, so that the procedure ends
   before you think it does (or else the file contains top-level
   code as well as procedures, and that's what's failing).

Is $::errorInfo informative?  Usually code that's intended to
be in a proc crashes pretty quickly at top level, so the
unbalanced brace is generally pretty close to the line
where the error is reported.
-- 
73 de ke9tv/2, Kevin

Re: sintax error?

Postby sunos.x86@gmail.com » Wed, 27 Jul 2005 21:30:02 GMT

 Thanks very much! I'm looking for it, but without luck... The
procedures are in:

  http://www.**--****.com/ 

 Thanks again!







Re: sintax error?

Postby Donal K. Fellows » Wed, 27 Jul 2005 21:58:21 GMT



Looking at the send_expect code linked off that page (that's where the
problem is, yes?) I notice that you've got an extra } towards the end of
the MODE 3 branch, probably immediately after you print the message
"Mode 3 failed". Deleting that line is probably what you want (it
produces code that looks like what you want to achieve).

As advice for the future, the editor Emacs has a key sequence for going
forwards (Ctrl-Alt-f) or backwards (Ctrl-Alt-b) over a bracketed chunk
of code, which makes finding this sort of problem *much* easier. I
believe that there's an equivalent for users of vi (and its derivatives,
of course).

Donal.

Re: sintax error?

Postby Bryan Oakley » Wed, 27 Jul 2005 22:08:01 GMT



The error appears to be in send_expect.tcl. In my editor (emacs) it is 
reporting that the curly brace on line 397 belongs to the preceeding 
proc definition (send_expect), but the comments in the code and the 
indentation implies you think it belongs to an if statement. Thus, the 
proc is being closed early and the remaining body of the proc is being 
executed since it is outside the proc definition.

In case you've added or removed lines since your last post, This is the 
abridged version of how my editor sees the code. Notice how the comment 
"# if failmax not reached" appears to apply to the wrong curly brace.

proc send_expect { id command { flags "" } } {
   ...
   if { $sendGlobals(useMode) <= 3 } {
     ...
   }
   # if failmax not reached
}
# if use this mode

##------------------------------------------------------------------------
## MODE 4 - index ...






Re: sintax error?

Postby sunos.x86@gmail.com » Thu, 28 Jul 2005 01:43:08 GMT

So, thanks!!
 I will learn about that "vi" sequence, because in the "highlight"
configuration, that error is not showed. Looking for that type of error
is anoying, and a nice editor is the answer (or better skills :).  That
four procedures are not mines. i'm going to use them in another app
that i'm writing... I have removed the "}", but the error continues...
but now you make me have sure that is a sintaxe error, so i can look.
:)
 Did you remove the "}" ? Can you source that procedure in expect promp
without problems?
 Thanks again.


Re: sintax error?

Postby Darren New » Thu, 28 Jul 2005 01:50:10 GMT




The % sign. Or
:set automatch
which will supposedly flash the cursor to the matching element when you 
type a balanced characte ([{()]})

-- 
   Darren New / San Diego, CA, USA (PST)
     Indications you're in trouble, #37:
     Your accountant charges you interest for
     not paying bills for which you already have
     the canceled checks back.

Re: sintax error?

Postby Glenn Jackman » Thu, 28 Jul 2005 01:54:17 GMT


[...]

In vi, you want %
    :help %

In vim, these are handy:  [{ and ]}

-- 
Glenn Jackman
NCF Sysadmin
 XXXX@XXXXX.COM 

Re: sintax error?

Postby sunos.x86@gmail.com » Thu, 28 Jul 2005 01:59:05 GMT

Hello again...
 I guess it's solved. I did remove the "}" towards the Mode 3 end, and
did put one "{" in the for statement:
        for {set sendGlobals(index) 0}         \
 ---------> {(sendGlobals(index) < $sendLength} \
             {incr sendGlobals(index)} {

 Now, if there is a error, is logical...
 Thanks very much!
ps.: I did try notify the author about that errors, but he did not
answer... :(


Re: sintax error?

Postby Bryan Oakley » Thu, 28 Jul 2005 03:15:26 GMT



Is that the real code? It looks like you have an extra "(" in there: 
'{(sendGlobals..'. Perhaps the problem is, instead of adding a "{" you 
should have changed the "(" to a "{".

Re: sintax error?

Postby sunos.x86@gmail.com » Thu, 28 Jul 2005 23:50:42 GMT

yeap, and put a "$", because sendGlobas(index) is a variable... :)
 Now it's "sourcing", and i'm having "logical" errors... but it is
another problem.
 Thanks.


Similar Threads:

1.please help! unknown sintax errors with my code?

what is wrong with my code that I get these errors when I check
sintax?

ERROR:HDLParsers:164 -
C:/projects/XilinxISEProjects/WL02Coolrunner/BCD_27SEGM.vhd Line 25.
parse error, unexpected LT, expecting OPENPAR or TICK or LSQBRACK
ERROR:HDLParsers:164 -
C:/projects/XilinxISEProjects/WL02Coolrunner/BCD_27SEGM.vhd Line 26.
parse error, unexpected LT, expecting OPENPAR or TICK or LSQBRACK
....ect....


library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

entity BCD_27SEGM is
port (
     PHASE: in STD_LOGIC;	--LCD USES PHASE TO PREVENT BURNING
	BCD:	in std_logic_vector(3 downto 0);
	segment:	out std_logic_vector(6 downto 0)
	);
end BCD_27SEGM;

architecture Behavioral of BCD_27SEGM is
begin
process (BCD,PHASE)
	begin
	if (PHASE = '0') then
	  case BCD is	-- display segment order a b c d e f g
		when "0000" =>  segment < = "1111110";
		when "0001" =>  segment < = "0110000"; 
		when "0010" =>  segment < = "1101101"; 
		when "0011" =>  segment < = "1111001"; 
		when "0100" =>  segment < = "0110011"; 
		when "0101" =>  segment < = "1011011"; 
		when "0110" =>  segment < = "1011111"; 
		when "0111" =>  segment < = "1110000"; 
		when "1000" =>  segment < = "1111111"; 
		when "1001" =>  segment < = "1110011"; 
		when others =>  segment < = "0000000";
	  end case;
	 elsif (PHASE = '1') then
	   case BCD is	-- display segment order a b c d e f g
		when "0000" =>  segment < = "0111111";
		when "0001" =>  segment < = "1001111"; 
		when "0010" =>  segment < = "0010010"; 
		when "0011" =>  segment < = "0000110"; 
		when "0100" =>  segment < = "1001100"; 
		when "0101" =>  segment < = "0100100"; 
		when "0110" =>  segment < = "0100000"; 
		when "0111" =>  segment < = "0001111"; 
		when "1000" =>  segment < = "0000000"; 
		when "1001" =>  segment < = "0001100"; 
		when others =>  segment < = "1111111";
	  end case;
	 end if;
	end process;
end Behavioral;

2.LINECOUNTER IN C55 -RTF?!* WHAT IS EXCATLY SINTAX???

o.k.
1.global
2.embeds
MODULE('Windows')
   SendMessage(LONG, LONG, LONG, LONG), LONG, PASCAL, PROC, NAME('SendMessageA')
END
3. case event -rtf control....
 and ?
 sendmessage(em_getlinecount)  or what?


3.Newbie question: define-sintax macros

Say I have a function that accepts a variable number of arguments and
displays them:

(define (multi-display . args)
  (let loop ((args args))
    (if (pair? args)
      (begin (display (car args)) (loop (cdr args)))
    )
  )
)

I want to write it as a macro
I did it using the common lisp-like define-macro construct:

(define-macro (multi-display . args)
    (cons 'begin
        (let loop ((cur-args args) (acc '()))
                (if (null? cur-args) (reverse acc) (loop (cdr cur-args)
(cons (list 'display (car cur-args)) acc)))
        )
    )
)

Is it possible to define it using r5rs define-syntax? How?
Thank you.

4.Cg , GLHS - ada-like languages with C sintax ?

Hello,

i recently found one thing (it maybe was already posted somewhere in
that group),

Nvidia's Cg (C fot graphics accelerators, programs that are executed
inside graphics card)  looks like ada,except C sintax.

There's in,out,and inout paramethers :)! And lots of demand for
separate packages for vertex shader and fragment shader,etc.

Maybe subset of ada could be better for that purprose anyway?
(heh,graphics programs don't need ada safety _at_all_,but...)

GLHS(opengl shader language ) looks like Cg.

Regards,

Dmytry Lavrov.

5.tralnslate sintax from nasm to gas

hi all

i need to translate this sintax from nasm to gas, but have do many
error

1)        ORG     0x7C00
2)        BITS    16
3)        times (510-($-boot)) db 0
                        dw      0xAA55
4)         jmp     dword 8:body_32

can you help me about, code or indication i can find right translation
?

intel2gas don't work

thanx in advance

claudio

6. Strange sintax

7. How can this sintax be explained?

8. newbe and problems with sintax



Return to tcl

 

Who is online

Users browsing this forum: No registered users and 27 guest