Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6824383
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:53:41+00:00 2026-05-26T21:53:41+00:00

I have developed some code, and I’m facing problem with error flagging of the

  • 0

I have developed some code, and I’m facing problem with error flagging of the Tcl interpreter on a Linux machine.

#!/usr/bin/tclsh
if {1} {
  puts "abc1"
} elseif {} {
  puts "abc2" 
}

The above code is not flagging error for "elseif" condition until it get into the
elseif condition.
Is there any way to check this kind of typo error done unintentionally.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T21:53:42+00:00Added an answer on May 26, 2026 at 9:53 pm

    To elaborate on Donal’s answer, Tcl does not find errors at compile time because in the general case it cannot be done, any code executed before the if might have redefined the if command, so it could be valid, the only way to determine if this is the case is to run the code (i.e. this is the halting problem)

    consider this script:

    gets stdin input
    if {$input == "fail"} {
      rename if if_
      proc if {arg1 arg2 arg3} {
        puts "ha ha"
      }
    }
    if {1} { puts "success"}
    

    clearly it is impossible to statically determine if the if {1} line has the right number of arguments without running the program

    TCL really has virtually no syntax, there is nothing a compiler can check, the best you can do is Lint style warnings, which will only be accurate in some cases

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Task at hand — I have three versions of some code, developed by different
I have some ANSI C code that I developed on my Mac, but when
I have some code I developed in python 2.4++ and you bet, I have
I have some .NET code I use from VB6 code. I have always developed
I have some code written in PHP, but I have also developed a script
I have developed some code which creates excel macros and each time after creation
In code I have developed some years ago I have been using this a
I have an existing InfoPath 2007 form that has some code-behind developed with VSTA.
I have taken over some code from a previous developer and have come across
I have inherited some code (from zip file) from a developer and git initialzed,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.