info

info(msg)

Display an informational message. Argument msg is a string describing the information to be displayed.

Examples

info(msg::AbstractString)

Display an informational message specified by the string msg.

julia> info("This is an informational message.")
[ Info: This is an informational message.

Common examples of its use:

  1. Display progress information:

    julia> info("Processing data...")
    [ Info: Processing data...
  2. Print debugging information:

    julia> info("Debugging information: x = $x, y = $y")
    [ Info: Debugging information: x = 10, y = 20
  3. Display status updates:
    julia> status = "Downloading file..."
    julia> info("Status: $status")
    [ Info: Status: Downloading file...

Common mistake example:

julia> info(42)
ERROR: MethodError: no method matching info(::Int64)

In this example, the argument provided to info is not a string (Int64 instead). Make sure to pass a string as the argument to info.

Please note that the info function typically outputs the message to the console or log file, depending on the logging configuration.

See Also

:@printf, :@sprintf, display, displayable, dump, info, isprint, print, println, print_escaped, print_joined, print_shortest, print_unescaped, print_with_color, pushdisplay, redisplay, show, showall, showcompact, sprint, versioninfo,

User Contributed Notes

Add a Note

The format of note supported is markdown, use triple backtick to start and end a code block.

*Required Field
Details

Checking you are not a robot: