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 695775
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T02:59:39+00:00 2026-05-14T02:59:39+00:00

While I’m learning a new language, I’ll typically put lots of silly println’s to

  • 0

While I’m learning a new language, I’ll typically put lots of silly println’s to see what values are where at specific times. It usually suffices because the languages typically have available a tostring equivalent. In trying that same approach with erlang, my webapp just “hangs” when there’s a value attempted to be printed that’s not a list. This happens when variable being printed is a tuple instead of a list. There’s no error, exception, nothing… just doesn’t respond. Now, I’m muddling through by being careful about what I’m writing out and as I learn more, things are getting better. But I wonder, is there a way to more reliably to [blindly] print a value to stdout?
Thanks,

–tim

  • 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-14T02:59:39+00:00Added an answer on May 14, 2026 at 2:59 am

    In Erlang, as in other languages, you can print your variables, no matter if they are a list, a tuple or anything else.

    My feeling is that, for printing, you’re doing something like (just a guess):

    io:format("The value is: ~p.", A).
    

    This is wrong, because you’re supposed to pass a list of arguments:

    io:format("The value is: ~p.", [A]).
    

    Where A can be anything.

    I usually find comfortable to use:

    erlang:display/1
    

    to print variables.

    Also, tracing functions is usually a better way to debug an application, rather than using printouts. Please see:

    http://aloiroberto.wordpress.com/2009/02/23/tracing-erlang-functions/

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

Sidebar

Related Questions

While I restart resque workers during deploy if new job comes in, then these
While using the GWT application, I deployed the new version of the application. Once
While I can get a list of pages within a specific category using 'categorymembers',
While I was digging into OpenNTPD source code files, I noticed new keywords and
While passing a set to create a new set in java,any modifications made to
While I do a program, sometimes I've got this doubt. I have been using
While googling how to convert a BIT (YESNO) column in an access database to
While Zope 2.13 have native wsgi support, I haven't been able to find any
while editing cell value in JTable it's value suddenly appears in exponential form(i.e. 1.7E10)
While running a landscape activity and a popup dialog is displayed, which is in

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.