Skip to main content

Posts

Showing posts with the label ProgrammingTemplate

GoLang from Programming Template

About Memory: 1. How do I get memory, i.e how are variables declared. Any specific facts and constrains about variables ? Basic data types are here .Declare the variables which you'll need outside the entry point of main function. Something like : var ( ToBe   bool       = false MaxInt uint64     = 1<<64 - 1 z      complex128 = cmplx.Sqrt(-5 + 12i) ) local variables can be declared as shown as example in explanation of FOR loop. 2. How do we get the entry point for the program execution ? [ Example : main() in the C program ] func main() --> is the entry point of the program execution. 3. How does dynamic memory handled ? Is it supported in first place ? Yes dynamic memory is supported.  new  allocates zeroed storage for a new item or type whatever and then returns a pointer to it. Go has garbage collection. This means the Go runtime checks in the background if an object or any other varia...

"Swift" from Programming Template

About Memory: 1. How do I get memory, i.e how are variables declared. Any specific facts and constrains about variables ? If type annotation like var Varb:Float ; is not used then it is mandatory to assign the initial value to the variable. "Var" keyword should get you the required memory. 2. How do we get the entry point for the program execution ? [ Example : main() in the C program ] Script based. There is no particular entry point. 3. How does dynamic memory handled ? Is it supported in first place ? Instances for the classes can be created. Automatic Reference counting mechanism has the strong reference to one of the variable. Till there is strong reference to the variable it'll be there in the memory. Once there is no strong reference it'll be de-initialized. [ Ref : https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/AutomaticReferenceCounting.html ] 4. What are the datatypes which are supported an...

"Action Script" from Programming Template

How do I get memory, i.e how are variables declared ? And specific facts and constraints about variables ? Ex : var food:String; food=”pizza”; Var : keyword, needed by syntax Food: user specific name String: data type, it can be class name or interface name. trace("My favorite food is " + food); // displays "My favorite food is pizza" ________________________________________________________________ How do we get the entry point for the program execution ? Select File > New. In the New Document dialog box, select Flash Document, and click OK. A new Flash window is displayed. Select File > Save. Select the same folder that contains the Greeter.as class file, name the Flash document HelloWorld.fla, and click OK. * In the Flash Tools palette, select the Text tool, and drag across the Stage to define a new text field, approximately 300 pixels wide and 100 pixels high. * In the Properties panel, with the text field still selected on the St...