Oct Function

Tips >>ASP Functions

WANTS TO MAKE SOFTWARE WITHOUT KNOWLEDGE OF ASP? CLICK HERE

The Oct function returns a string that represents the octal value of a specified number. The number argument is any valid expression. You can represent octal numbers directly by preceding numbers in the proper range with & O. For example, &O10 is the octal notation for decimal 8.

Note :- If number is not already a whole number, it is rounded to the nearest whole number before being evaluated.

The Syntax of the Oct Function is :-

Oct(number)

Its Description is :-

If number is Oct returns
Null Null.
Empty Zero (0).
Any other number Up to 11 octal characters

Example#1 :-

Code :-
<%
document.write(Oct(11) & "<br />")
document.write(Oct(12) & "<br />")
document.write(Oct(400) & "<br />")
document.write(Oct(459) & "<br />")
document.write(Oct(460))
%>
Output :-
13
14
620
713
714

Example#2 :-

Code :-
<%
document.write(Oct(3) & "<br />")
document.write(Oct(5) & "<br />")
document.write(Oct(9) & "<br />")
document.write(Oct(10) & "<br />")
%>
Output :-
3
5
11
12

Example#3 :-

Code :-
<%
document.write(Oct(4) & "<br />")
document.write(Oct(8) & "<br />")
document.write(Oct(459) & "<br />")
%>
Output :-
4
10
713

Example#4 :-

Code :-
<%
document.write(Oct(123) & "<br />")
%>
Output :-
173

Note :- You can also use a negative integer number.

Example#5 :-

Code :-
<%
document.write(Oct(-123) & "<br />")
%>
Output :-

177605

Note :- For a number with a decimal point (floating-point), the digits to the right of the decimal point are ignored.

 

 
E-mail : sales@virtualsplat.com
Phone : +91-9892413501

Whatsapp Icon +91-9967648641

Whatsapp Icon +91-9967648641