Senin, 20 Agustus 2018

First Tcl is woefully under script for beginners: "Hello World"

First Tcl is woefully under script for beginners: "Hello World" - Another issue when using dual-SIM phones is where your contacts are stored. We found that by default the contacts from both SIM cards are stored in the phonebook. If you'd rather see the contacts from only one SIM, tap the three dots icon (within the Contacts app) and choose 'Contacts to display'. You can then select All contacts, Gmail contacts, phone contacts or one of your two SIMs. times which is frustrating, well we have collected a lot of data from the field directly and from many other blogs so very complete his discussion here about First Tcl is woefully under script for beginners: "Hello World", on this blog we also have to provide the latest automotive information from all the brands associated with the automobile. ok please continue reading:

Hope you all have installed ns2 , now we can go for coding
As the ns2 simulations work on tcl scripts so we should know about tcl
Here some simple steps to write the "hello world" program in tcl

we can write tcl codes in two ways in interactive mode and in batch mode

first we can have look to interactive mode 

1.open the terminal
             type  $ ns
2. a command prompt open
         Create a new simulator object by using the command
                        set ns [ new Simulator ]

This is Usually the first non-comment statement in ns-2 script 
- Initialize the packet format
   - Create a scheduler (default is a calendar scheduler)
   - Create a “null agent”

3.  to print text on screen we use puts command
               $ns at 1 "puts "\Hello World\""
    here we Schedule an event to write at the time 1 
      by this script simulator instance "ns" writes "hello World"
4.  now we have to exit the simulator object
                         $ns at 1.5 "exit"

 5. now we have to run the simulator object,
                      $ns run
this starts ns
           
and this prints hello world

In batch mode  its much simple

open a text editor and write the codes there and save it with .tcl  file extention 

 expamlpe

 hello.tcl :

set ns [new Simulator]
$ns at 1 "puts \"hello world\""
$ns at 1.5 "exit"
$ns run

open the terminal and execute the hello.tcl by
            $ ns hello.tcl
 












List of Top Authorized Mobile Application Development Companies
https://nandncomputers.blogspot.com/2016/04/list-of-top-authorized-mobile.html
Volcano Box 3.0 Aka Inferno MTK V 0.1F2 Installer Download
https://nandncomputers.blogspot.com/2016/06/volcano-box-30-aka-inferno-mtk-v-01f2.html
New Apple Release Date and Video Showcases Cheap iPhone 7 Clone Based on ‘Genuine Casing’
https://nandncomputers.blogspot.com/2016/07/new-apple-release-date-and-video.html
10 Reasons Why You Should Start a Spiritual Journal Today
https://nandncomputers.blogspot.com/2016/09/10-reasons-why-you-should-start.html
Lawyers who lunch - role of experts in litigation and the EPO in the 21st Century
https://nandncomputers.blogspot.com/2016/09/aippi-congress-report-4-lawyers-who.html

Tidak ada komentar:

Posting Komentar