Friday, March 20, 2020

Essay on Common Worth Banneker

Essay on Common Worth Banneker Essay on Common Worth Banneker During the late eighteen century slavery was still very common throughout the world. Benjamin Banneker, a son of a former slave, was a well-rounded person and was against slavery. Banneker wrote a thought felt letter to Thomas Jefferson, A Founding Father of the declaration of Independence saying how slavery should be abolished. Although Banneker does not want to upset Jefferson, he states how Jefferson is a hypocrite, in a sincere way because he allows slavery when he says all men are created equal. Banneker also explains how Jefferson has experienced slavery as the British colonized his country. In the Declaration Of Independence it is said that, â€Å"we hold these truths to be self-evident, that all men are created equal,...That among these are life, liberty and the pursuit of happiness.† Banneker stresses how Franklin is going against the Declaration by allowing slavery. He uses words such as sir, and suffer me to get his point across in a non offensive way. Banneker also talks about how Franklin knows what is right,but does not follow it. Franklin should just put himself in the shoes of the slaves to understand what they are going through. Banneker makes Franklin feel guilty by using a phrase from the bible, â€Å"Put your souls in their souls stead,†thus shall your hearts be enlarged with kindness and benevolence towards them.† Banneker also takes Franklin back to when he was enslaved by the British's colonization and that when Franklin was freed from British rule, his

Tuesday, March 3, 2020

The Traps of the If-Then-Else Statement in Delphi Code

The Traps of the If-Then-Else Statement in Delphi Code In Delphi, the if statement is used to test for a condition and then execute sections of code based on whether that condition is True or False. A general if-then-else statement looks like this: if condition then true block else false block; Both the true block and the false block can either be a simple statement or a structured statement (surrounded with a begin-end pair). Example of a Nested If-Then-Else Statement Lets consider one example using nested if statements: j : 50; if j 0 then   Ã‚  if j 100 then Caption : Number is 100!else   Ã‚  Caption : Number is NEGATIVE!;v What will be the value of Cation? Answer: Number is NEGATIVE! Did not expect that? Note that the compiler does not take your formatting into account, you could have written the above as: j : 50; if j 0 thenif j 100 then Caption : Number is 100!else Caption : Number is NEGATIVE!;v or even as (all in one line): j : 50; if j 0 then if j 100 then Caption : Number is 100!else Caption : Number is NEGATIVE!;v The ; marks the end of a statement. The compiler will read the above statement as: j : 50; if j 0 then   Ã‚  if j 100 then   Ã‚  Ã‚  Ã‚  Caption : Number is 100!   Ã‚  else   Ã‚  Ã‚  Ã‚  Caption : Number is NEGATIVE!; or to be more precise: j : 50; if j 0 thenbegin   Ã‚  if j 100 then   Ã‚  Ã‚  Ã‚  Caption : Number is 100!   Ã‚  else   Ã‚  Ã‚  Ã‚  Caption : Number is NEGATIVE!; end; Our ELSE statement will be interpreted as a part of the inner IF statement. The inner statement is a closed statement and doesnt need a BEGIN..ELSE. How to Fix To make sure you know how your nested if statements are treated by the compiler, and to fix the above problem, you can write the initial version as: j : 50; if j 0 then   Ã‚  if j 100 then Caption : Number is 100! elseelse   Ã‚  Caption : Number is NEGATIVE!; Uh! The ugly else ends the nested if line!? Does compile, does work! The best solution is: always use begin-end pairs with nested if statements: j : 50; if j 0 thenbegin   Ã‚  if j 100 then Caption : Number is 100!;endelsebegin   Ã‚  Caption : Number is NEGATIVE!; end Too much begin-end pairs for you? Better safe than sorry. Anyway, Code Templates are designed to add commonly used skeleton structures to your source code and then fill in. Article submitted by Marcus Junglas