BitSizeOf Function

Purpose

Returns the size of a fixed or a numeric variable in bits

Syntax

% = BitSizeOf(variable)

variable: avar

Description

With the function BitSizeOf you get the size of a numeric variable, a fixed string, type elements, array’s, etc..

Example

OpenW 1

Type atest

- Byte a

- Int b

- Double c

- Byte d

EndType

Dim a As atest

a.a = 1 : a.b = 2 : a.c = 3 : a.d = 4

Print " Size of the element in bit"

Print "BitSizeOf of a: ", BitSizeOf(a.a)

Print "BitSizeOf of b: ", BitSizeOf(a.b)

Print "BitSizeOf of c: ", BitSizeOf(a.c)

Print "BitSizeOf of d: ", BitSizeOf(a.d)

Print

Print " Size of the element's in byte"

Print "SizeOf of a: ", SizeOf(a.a)

Print "SizeOf of b: ", SizeOf(a.b)

Print "SizeOf of c: ", SizeOf(a.c)

Print "SizeOf of d: ", SizeOf(a.d)

Do

Sleep

Until Me Is Nothing

Remarks

See Also

SizeOf, BitOffsetOf, OffsetOf

{Created by Sjouke Hamstra; Last updated: 20/10/2014 by James Gaite}