Tuesday, March 17, 2020
The History of American Slang Essays
The History of American Slang Essays The History of American Slang Essay The History of American Slang Essay When thinking of American slang, you may think that is just something that youth have made up to make themselves sound cool when they speak. This is not the case. Slang has been used in America since the late 1800ââ¬â¢s. It is defined as ââ¬Å"a type of language that consists of words and phrases that are regarded as very informal, are more common in speech than writing, and are typically restricted to a particular context or group of people.â⬠A lot of slang that was used back then is still used today. I will give just a brief overview of popular slang that has been used over the last century. By the 18th century, the differences between American English and other English speaking countries began the evolution of slang. For a while, any word not used in Britain was considered slang. As early as 1870, slang was prominent in the early years of the United States. The word ââ¬Å"badâ⬠has been used to mean ââ¬Å"goodâ⬠and ââ¬Å"dudeâ⬠to refer to a guy, for example, were some of the first slang to be used among Americans. Each decade has originated its own slang that has stood out from the decade prior. Here are a few common slang words and expressions from recent decades. From the 1950ââ¬â¢s, ââ¬Å"boo booâ⬠to mean a mistake, ââ¬Å"garbageâ⬠to mean nonsense and ââ¬Å"hotâ⬠to describe someone attractive were commonly used. In the 1960ââ¬â¢s, the terms ââ¬Å"far outâ⬠meaning amazing, using ââ¬Å"hassleâ⬠instead of annoy and getting good ââ¬Å"vibesâ⬠, or feelings, were popular. The 1970ââ¬â¢s originated words such as ââ¬Å"bogusâ⬠to replace unfair, ââ¬Å"grossâ⬠to mean something disgusting and ââ¬Å"no brainer, to describe an easy problem. From the 1980ââ¬â¢s, 1990ââ¬â¢s, and 2000ââ¬â¢s there were quite a few phrases originated that are still prominent in todayââ¬â¢s society. For example; using ââ¬Å"cribâ⬠instead of house, ââ¬Å"blingâ⬠for jewelry or glitter, ââ¬Å"hoodâ⬠to describe a juvenile delinquent and ââ¬Å"buzzâ⬠, referring to someone shaving their head. Most rec
Sunday, March 1, 2020
Understanding and Implementing Array Data Types in Delphi
Understanding and Implementing Array Data Types in Delphi Arrays allow us to refer to a series of variables by the same name and to use a number (an index) to call out individual elements in that series. Arrays have both upper and lower boundsà and the elements of the array are contiguous within those bounds. Elements of the array are values that are all of the same type (string, integer, record, custom object). In Delphi, there are two types of arrays: a fixed-size array which always remains the same sizeaà static arrayand a dynamic array whose size can change at runtime. Static Arrays Suppose we are writing a program that lets a user enter some values (e.g. the number of appointments) at the beginning of each day. We would choose to store the information in a list. We could call this list Appointments, and each number might be stored as Appointments[1], Appointments[2], and so on. To use the list, we must first declare it. For example: var Appointments : array[0..6] of Integer; declares a variable called Appointments that holds a one-dimensional array (vector) of 7 integer values. Given this declaration, Appointments[3] denotes the fourth integer value in Appointments. The number in the brackets is called the index. If we create a static array but donââ¬â¢t assign values to all its elements, the unused elements contain random data; they are like uninitialized variables. The following code can be used to set all elements in the Appointments array to 0. for k : 0 to 6 do Appointments[k] : 0; Sometimes we need to keep track of related information in an array. For example, to keep track of each pixel on your computer screen, you need to refer to its X and Y coordinates using a multidimensional array to store the values. With Delphi, we can declare arrays of multiple dimensions. For example, the following statement declares a two-dimensional 7 by 24 array: var DayHour : array[1..7, 1..24] of Real; To compute the number of elements in a multidimensional array, multiply the number of elements in each index. The DayHour variable, declared above, sets aside 168 (7*24) elements, in 7 rows and 24 columns. To retrieve the value from the cell in the third row and seventh column we would use: DayHour[3,7] or DayHour[3][7]. The following code can be used to set all elements in the DayHour array to 0. for i : 1 to 7 do for j : 1 to 24 do DayHour[i,j] : 0; Dynamic Arrays You may not know exactly how large to make an array. You may want to have the capability of changing the size of the array at runtime. A dynamic array declares its type, but not its size. The actual size of a dynamic array can be changed at runtime by the use of the SetLength procedure. var Students : array of string; creates a one-dimensional dynamic array of strings. The declaration does not allocate memory for Students. To create the array in memory, we call SetLength procedure. For example, given the declaration above, SetLength(Students, 14) ; allocates an array of 14 strings, indexed 0 to 13. Dynamic arrays are always integer-indexed, always starting from 0 to one less than their size in elements. To create a two-dimensional dynamic array, use the following code: var Matrix: array of array of Double; begin SetLength(Matrix, 10, 20) end; which allocates space for a two-dimensional, 10-by-20 array of Double floating-point values. To remove a dynamic arrays memory space, assign nil to the array variable, like: Matrix : nil; Very often, your program doesnt know at compile time how many elements will be needed; that number will not be known until runtime. With dynamic arrays, you can allocate only as much storage as is required at a given time. In other words, the size of dynamic arrays can be changed at runtime, which is one of the key advantages of dynamic arrays. The next example creates an array of integer values and then calls the Copy function to resize the array. var Vector: array of Integer; k : integer; begin SetLength(Vector, 10) ; for k : Low(Vector) to High(Vector) do Vector[k] : i*10; ... //now we need more space SetLength(Vector, 20) ; //here, Vector array can hold up to 20 elements //(it already has 10 of them)end; The SetLength function creates a larger (or smaller) array and copies the existing values to the new array. The Low and High functions ensure you access every array element without looking back in your code for the correct lower and upper index values.
Subscribe to:
Posts (Atom)