Skip to content

Commit

Permalink
Changed the argument names to base to be more informative in the repl.
Browse files Browse the repository at this point in the history
Now, methods(base) will have more than single-letter variable names.
I also modified the help documentation to mirror the variable name change.
  • Loading branch information
astrieanna committed Mar 19, 2013
1 parent fe5d201 commit 6dda2b9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions base/intfuncs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,9 @@ function _base(symbols::Array{Uint8}, b::Int, x::Unsigned, pad::Int, neg::Bool)
ASCIIString(a)
end

base(b::Integer , x::Integer, pad::Integer) = _base(dig_syms,int(b),unsigned(abs(x)),pad,x<0)
base(s::Array{Uint8}, x::Integer, pad::Integer) = _base(s,length(s),unsigned(abs(x)),pad,x<0)
base(b::Union(Integer,Array{Uint8}), x::Integer) = base(b, x, 1)
base(base::Integer, n::Integer, pad::Integer) = _base(dig_syms,int(base),unsigned(abs(n)),pad,n<0)
base(symbols::Array{Uint8}, n::Integer, p::Integer) = _base(symbols,length(symbols),unsigned(abs(n)),p,n<0)
base(base_or_symbols::Union(Integer,Array{Uint8}), n::Integer) = base(base_or_symbols, n, 1)


for sym in (:bin, :oct, :dec, :hex)
Expand Down
8 changes: 4 additions & 4 deletions doc/helpdb.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2587,12 +2587,12 @@
"),

("Data Formats","Base","base","base(b, n[, pad])
("Data Formats","Base","base","base(base, n[, pad])
Convert an integer to a string in the given base, optionally
specifying a number of digits to pad to. The base \"b\" can be
specified as either an integer, or as a \"Uint8\" array of
character values to use as digit symbols.
specifying a number of digits to pad to. The base can be specified
as either an integer, or as a \"Uint8\" array of character values
to use as digit symbols.
"),

Expand Down
4 changes: 2 additions & 2 deletions doc/stdlib/base.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1677,9 +1677,9 @@ Data Formats

Convert an integer to an octal string, optionally specifying a number of digits to pad to.

.. function:: base(b, n, [pad])
.. function:: base(base, n, [pad])

Convert an integer to a string in the given base, optionally specifying a number of digits to pad to. The base ``b`` can be specified as either an integer, or as a ``Uint8`` array of character values to use as digit symbols.
Convert an integer to a string in the given base, optionally specifying a number of digits to pad to. The base can be specified as either an integer, or as a ``Uint8`` array of character values to use as digit symbols.

.. function:: bits(n)

Expand Down

0 comments on commit 6dda2b9

Please sign in to comment.