Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 5,349 for fmtE (0.1 sec)

  1. src/math/big/ftoa.go

    func (x *Float) Append(buf []byte, fmt byte, prec int) []byte {
    	// sign
    	if x.neg {
    		buf = append(buf, '-')
    	}
    
    	// Inf
    	if x.form == inf {
    		if !x.neg {
    			buf = append(buf, '+')
    		}
    		return append(buf, "Inf"...)
    	}
    
    	// pick off easy formats
    	switch fmt {
    	case 'b':
    		return x.fmtB(buf)
    	case 'p':
    		return x.fmtP(buf)
    	case 'x':
    		return x.fmtX(buf, prec)
    	}
    
    	// Algorithm:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 11:59:09 UTC 2023
    - 13.5K bytes
    - Viewed (0)
  2. src/strconv/ftoa.go

    		mant |= uint64(1) << flt.mantbits
    	}
    	exp += flt.bias
    
    	// Pick off easy binary, hex formats.
    	if fmt == 'b' {
    		return fmtB(dst, neg, mant, exp, flt)
    	}
    	if fmt == 'x' || fmt == 'X' {
    		return fmtX(dst, prec, fmt, neg, mant, exp, flt)
    	}
    
    	if !optimize {
    		return bigFtoa(dst, prec, fmt, neg, mant, exp, flt)
    	}
    
    	var digs decimalSlice
    	ok := false
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:21:28 UTC 2024
    - 13.9K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/ir/fmt.go

    		fmt.Fprint(s, "[")
    		if n.Low != nil {
    			fmt.Fprint(s, n.Low)
    		}
    		fmt.Fprint(s, ":")
    		if n.High != nil {
    			fmt.Fprint(s, n.High)
    		}
    		if n.Op().IsSlice3() {
    			fmt.Fprint(s, ":")
    			if n.Max != nil {
    				fmt.Fprint(s, n.Max)
    			}
    		}
    		fmt.Fprint(s, "]")
    
    	case OSLICEHEADER:
    		n := n.(*SliceHeaderExpr)
    		fmt.Fprintf(s, "sliceheader{%v,%v,%v}", n.Ptr, n.Len, n.Cap)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 05 15:20:28 UTC 2023
    - 26K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/types/fmt.go

    //	%S	Short syntax: Name only, no matter what.
    func (s *Sym) Format(f fmt.State, verb rune) {
    	mode := fmtGo
    	switch verb {
    	case 'v', 'S':
    		if verb == 'v' && f.Flag('+') {
    			mode = fmtDebug
    		}
    		fmt.Fprint(f, sconv(s, verb, mode))
    
    	default:
    		fmt.Fprintf(f, "%%!%c(*types.Sym=%p)", verb, s)
    	}
    }
    
    func (s *Sym) String() string {
    	return sconv(s, 0, fmtGo)
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 12 15:41:17 UTC 2023
    - 15.7K bytes
    - Viewed (0)
  5. src/cmd/go/internal/fmtcmd/fmt.go

    // Copyright 2011 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // Package fmtcmd implements the “go fmt” command.
    package fmtcmd
    
    import (
    	"context"
    	"errors"
    	"fmt"
    	"os"
    	"path/filepath"
    
    	"cmd/go/internal/base"
    	"cmd/go/internal/cfg"
    	"cmd/go/internal/load"
    	"cmd/go/internal/modload"
    	"cmd/internal/sys"
    )
    
    func init() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 03 12:16:35 UTC 2022
    - 3K bytes
    - Viewed (0)
  6. src/fmt/format.go

    		}
    	}
    	return b
    }
    
    // fmtS formats a string.
    func (f *fmt) fmtS(s string) {
    	s = f.truncateString(s)
    	f.padString(s)
    }
    
    // fmtBs formats the byte slice b as if it was formatted as string with fmtS.
    func (f *fmt) fmtBs(b []byte) {
    	b = f.truncate(b)
    	f.pad(b)
    }
    
    // fmtSbx formats a string or byte slice as a hexadecimal encoding of its bytes.
    func (f *fmt) fmtSbx(s string, b []byte, digits string) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:31:55 UTC 2024
    - 13.8K bytes
    - Viewed (0)
  7. src/fmt/print.go

    	case 'v':
    		if p.fmt.sharpV {
    			p.fmt.fmtQ(v)
    		} else {
    			p.fmt.fmtS(v)
    		}
    	case 's':
    		p.fmt.fmtS(v)
    	case 'x':
    		p.fmt.fmtSx(v, ldigits)
    	case 'X':
    		p.fmt.fmtSx(v, udigits)
    	case 'q':
    		p.fmt.fmtQ(v)
    	default:
    		p.badVerb(verb)
    	}
    }
    
    func (p *pp) fmtBytes(v []byte, verb rune, typeString string) {
    	switch verb {
    	case 'v', 'd':
    		if p.fmt.sharpV {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 21:22:43 UTC 2024
    - 31.8K bytes
    - Viewed (0)
  8. src/runtime/syscall_windows_test.go

    		// integer types, and uint8Pair_t.
    		cTypes[i] = t.In(i).Name() + "_t"
    		if t.In(i).Name() == "uint8Pair" {
    			cArgs[i] = fmt.Sprintf("(uint8Pair_t){%d,1}", i)
    		} else {
    			cArgs[i] = fmt.Sprintf("%d", i+1)
    		}
    	}
    	fmt.Fprintf(w, `
    typedef uintptr_t %s (*%s)(%s);
    uintptr_t %s(%s f) {
    	return f(%s);
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 31 16:31:35 UTC 2023
    - 32.5K bytes
    - Viewed (0)
  9. src/math/bits/example_test.go

    	fmt.Printf("%08b\n", bits.RotateLeft8(15, -2))
    	// Output:
    	// 00001111
    	// 00111100
    	// 11000011
    }
    
    func ExampleRotateLeft16() {
    	fmt.Printf("%016b\n", 15)
    	fmt.Printf("%016b\n", bits.RotateLeft16(15, 2))
    	fmt.Printf("%016b\n", bits.RotateLeft16(15, -2))
    	// Output:
    	// 0000000000001111
    	// 0000000000111100
    	// 1100000000000011
    }
    
    func ExampleRotateLeft32() {
    	fmt.Printf("%032b\n", 15)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 18:16:09 UTC 2019
    - 5.3K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/test/testdata/gen/copyGen.go

    		fmt.Fprintf(w, "    t.Errorf(\"t%dcopy got=%%v, want %%v\\n\", a, want)\n", s)
    		fmt.Fprintf(w, "  }\n")
    		fmt.Fprintf(w, "}\n")
    	}
    
    	for _, s := range usizes {
    		// function being tested
    		fmt.Fprintf(w, "//go:noinline\n")
    		fmt.Fprintf(w, "func tu%dcopy_ssa(docopy bool, data [%d]byte, x *[%d]byte) {\n", s, s, s)
    		fmt.Fprintf(w, "  if docopy {\n")
    		fmt.Fprintf(w, "    *x = data\n")
    		fmt.Fprintf(w, "  }\n")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 20 02:13:02 UTC 2022
    - 3.6K bytes
    - Viewed (0)
Back to top