background preloader

Data Types

Facebook Twitter

File Formats

General Decimal Arithmetic. Most computers today support binary floating-point in hardware. While suitable for many purposes, binary floating-point arithmetic should not be used for financial, commercial, and user-centric applications or web services because the decimal data used in these applications cannot be represented exactly using binary floating-point. (See the Frequently Asked Questions pages for an explanation of this, and several examples.) The problems of binary floating-point can be avoided by using base 10 (decimal) exponents and preserving those exponents where possible.

This site describes a decimal arithmetic which achieves the necessary results and is suitable for both hardware and software implementation. It brings together the relevant concepts from a number of ANSI, IEEE, ECMA, and ISO standards, and conforms to the decimal formats and arithmetic in the IEEE 754 standard (‘754-2008’) published by the IEEE in August 2008, and the ISO/IEC/IEEE 60559:2011 standard, published by ISO in July 2011. IEEE 754-2008. What Are VB Strings? What Are VB Strings?

What Are VB Strings?

By Steven Roman www.romanpress.com Copyright 2001 © The Roman Press, Inc. All Rights Reserved. Introduction This article is devoted to describing the concept of a string as it relates to Visual Basic. Strings The subject of strings can be quite confusing, but this confusion tends to disappear with some careful attention to detail (as is usually the case). Indeed, the Visual Basic documentation tends to support this erroneous viewpoint at times. A data type consisting of a sequence of contiguous characters that represent the characters themselves rather than their numeric values. It seems to me that Microsoft is trying to say that the underlying set for the VB String data type is the set of finite-length sequences of characters.

Thus, the "string" help is represented as Note, however, that because words are written with their bytes reversed in memory, the "string" help appears in memory as Here is the key to understanding VB strings. Dim str As Stringstr = "help" The Complete Guide to C++ Strings, Part I. Introduction You've undoubtedly seen all these various string types like TCHAR, std::string, BSTR, and so on.

The Complete Guide to C++ Strings, Part I

And then there are those wacky macros starting with _tcs. And you're staring at the screen thinking "wha? " Well stare no more, this guide will outline the purpose of each string type, show some simple usages, and describe how to convert to other string types when necessary. In Part I, I will cover the three types of character encodings. The Complete Guide to C++ Strings, Part II. Introduction Since C-style strings can be error-prone and difficult to manage, not to mention a target for hackers looking for buffer overrun bugs, there are lots of string wrapper classes.

The Complete Guide to C++ Strings, Part II

Unfortunately, it's not always clear which class should be used in some situations, nor how to convert from a C-style string to a wrapper class. This article covers all the string types in the Win32 API, MFC, STL, WTL, and the Visual C++ runtime library. I will describe the usage of each class, how to construct objects, and how to convert to other classes. Nish has also contributed the section on managed strings and classes in Visual C++ 7. In order to get the full benefit from this article, you must understand the different character types and encodings, as I covered in Part I. Rule #1 of string classes Casts are bad, unless they are explicitly documented. A cast does not do any conversion to a string, unless the source string is a wrapper class with an explicitly documented conversion operator. _bstr_t. A Brief History of Delphi Strings. Strings are a bit of a mystery to most Delphi developers.

A Brief History of Delphi Strings

The fact that new features are added in almost every new release probably does not help the situation. For example, few developers know the difference between string, ShortStrings, long strings, AnsiStrings, WideStrings, openstrings etc.. ShortString We should start at the beginning. During the days of Delphi's direct ancestor Turbo Pascal, there was only one kind of string: the ShortString type. Var s: shortstring; actually consumes 256 bytes on the stack. Var s: array [0..255] of char; And the ShortString operations: 1) s := 'abc'; 2) s := s + t;

Delphi and Unicode. How to recognize different types of timestamps from quite a long way away. The great thing about timestamps is that there are so many to choose from.

How to recognize different types of timestamps from quite a long way away

Sometimes, while debugging (or reading incomplete documentation) you'll find a timestamp and wonder how to convert it into something readable. Here are some tips. We will use November 26, 2002 at 7:25p PST as our sample time. UNIX timestamps are in seconds since January 1, 1970 UTC. It is a 32-bit number, the only 32-bit number in common use as a timestamp. November 26, 2002 at 7:25p PST = 0x3DE43B0C. If it's a 32-bit value starting with "3", it's probably a UNIX time.