Visualizzazione dei risultati da 1 a 4 su 4
  1. #1

    [neofita] info su printf

    salve gente

    mi spiegate questo:
    \t6%u\

    in una funzione printf

    mi produce un codice tipo 645467324562

    la "t" lascia un tab
    mentre il "6" si vą a porre davanti al numero generato da %u

    adesso vorrei eliminare il il TAB, come devo fare?
    togliendo la t mi dą errore.

    grazie
    -Raia Riccardo-
    Un forumello gnocco
    La vita č strana per questo bella

    non ero moderatore quando zork era un alcolizzato

  2. #2
    Utente di HTML.it L'avatar di luke83
    Registrato dal
    Jul 2000
    Messaggi
    1,217
    % - a literal percent character. No argument is required.
    b - the argument is treated as an integer, and presented as a binary number.
    c - the argument is treated as an integer, and presented as the character with that ASCII value.
    d - the argument is treated as an integer, and presented as a (signed) decimal number.
    u - the argument is treated as an integer, and presented as an unsigned decimal number.
    f - the argument is treated as a float, and presented as a floating-point number.
    o - the argument is treated as an integer, and presented as an octal number.
    s - the argument is treated as and presented as a string.
    x - the argument is treated as an integer and presented as a hexadecimal number (with lowercase letters).
    X - the argument is treated as an integer and presented as a hexadecimal number (with uppercase letters).
    sostituisci uno di questi alla t...

    se nn va posta l'errore esatto che ti dą il parser
    ..::Luca::..
    » "se nn riesci a venirene a capo.. usa il tasto INVIO" © 2005 Luke83
    » "letta la documentazione, spazio all'immaginazione.." © 2006 Luke83
    [frasi random] - [Lucopedia] - [laFetta]

  3. #3
    ho risolto mettendo semplicemente

    6%u

    invece di
    \6%u\



    grazie mille, il tuo aiuto č stato decisivo.
    -Raia Riccardo-
    Un forumello gnocco
    La vita č strana per questo bella

    non ero moderatore quando zork era un alcolizzato

  4. #4
    Utente di HTML.it L'avatar di luke83
    Registrato dal
    Jul 2000
    Messaggi
    1,217
    uh? :master:

    ok.. ciaone
    ..::Luca::..
    » "se nn riesci a venirene a capo.. usa il tasto INVIO" © 2005 Luke83
    » "letta la documentazione, spazio all'immaginazione.." © 2006 Luke83
    [frasi random] - [Lucopedia] - [laFetta]

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.