PERL/C3/Access-Modifiers-in-PERL/Khasi

From Script | Spoken-Tutorial
Revision as of 22:19, 25 July 2017 by Pdiangburom (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Time
Narration
00:01 Khublei ngi pdiangsngewbha iaphi sha ka Spoken Tutorial halor ka Access Modifiers in PERL.
00:07 Ha kane ka jinghikai, ngin ia pule shaphang ka:

Scope jong ki variables Private variables Dynamically scoped variables Global variables

00:19 Na ka bynta kane ka jinghikai, nga pyndonkam da ka:

Ubuntu Linux 12.04 operating system Perl 5.14.2 bad ka gedit Text Editor.

00:32 Phi lah ban pyndonkam kano kano ka text editor katkum kamon jong phi.
00:36 Phi dei ban don ia ka jingtip badonkam shaphang ka Perl programming.
00:40 Lada phim don, te leit sha ki spoken tutorials ha ka Perl ha ka spoken tutorial website.
00:47 To ngin ia sdang da ka lamphrang sha ka scope jong ki varibles.
00:51 Ka scope jong u variable kadei ka bynta jong u code ba hapoh uba ia u variable lah ban access.
00:58 Ha kawei ka rukom, ka thew ia ka jinglah ban iohi ia ki variables.
01:03 Nyngkong, ngin ia batai shaphang ka my, local bad our modifiers ha ka Perl.
01:10 my kamut Private variables,
01:13 local kamut Dynamically scoped variables,
01:17 our kamut Global variables.
01:20 Ki variables ba lah declare bad u my keyword kin duh noh ia u scope shabar ka block ha kaba lah declare ia ki.
01:28 Phi lah ban declare ia u variable khlem da ai ia u value, kum:

my $fvalue semicolon

01:37 Phi lah ruh ban declare ia u variable da kaba assign ia u value ha u, kum:
01:43 my $fValue = 1 semicolon
01:48 my $fname = within double quotes Rahul semicolon
01:55 Ka syntax ban declare ia ki variables da ujuh u my statement kadei kumne harum:
02:02 my open bracket $fname comma $lname comma $age close bracket semicolon
02:12 To ngin ia pyrshang ban sngewthuh ia ki private variables da kaba pyndonkam ia ka sample program.
02:17 Nga lah don lypa ia ka sample program. To ngan plie ia ka 'gedit' Text editor.
02:24 Plie ia ka terminal bad type: gedit scope hyphen my dot pl ampersand bad shon Enter.
02:34 Ka Scope-my dot pl file ka lah plie mynta ha ka gedit.
02:39 Type ia u code harum kumba la pyni ha ka screen. To mynta ngan batai ia u code.
02:46 Hangne, nga la declare ia u private variable $fname da u 'my' keyword
02:52 Bad assign ia u value "Raghu" ha u.
02:56 Hapoh jong une u block, ka print statement ka print ia u value ha ka fname variable kata "Raghu".
03:04 Ha u block uba bud, nga lah assign ia u value "Other" ha ujuh u private variable $fname.
03:11 Te, ka print statement kan print "Other", hapoh jong une u block.
03:17 Ka print statement kaba khatduh ha kane ka program kan nym print kano kano ka output.
03:23 Kane kadei namar, shabar ka scope jong ki blocks ba la batai hashwa, ka fname kam don ia u value ba la assign ha u.
03:32 Mynta, shon Ctrl+S ban save ia ka file.
03:37 To mynta ngin ia execute ia ka program.
03:40 Phai biang sha ka terminal bad type: perl scope hyphen my dot pl bad shon Enter.
03:49 Ka output kapaw kum:

"Block 1: Raghu" "Block 2: Other" "Outside Block: " kam don ia ka output.

03:59 Te, ka scope jong ka 'my' variable la access tang hapoh jong ka block jong u code.
04:06 Mynta, to ngin pynkylla khyndiat ia ka program ba la don lypa.
04:10 To ngin pyndap my $fname = within double quotes John semicolon shabar jong ki blocks, hashwa ka print statement ba khatduh.

Save ia ki jingpynkylla.

04:23 Phai biang sha ka terminal bad execute kumba leh hashwa.
04:28 Peit thuh bha ia ka output kaba la pyni.
04:32 Kyrmen ba phi lah ban sngewthuh ia ka scope ba la pyndonkam da u 'my' variable hapoh bad shabar jong u block.
04:41 Hadien kane, ngin sa iohi shaphang ka dynamically scoped variable ha ka Perl.
04:47 Local keyword u ai ia u scope ba shipor sha ka global variable.
04:52 U variable u paw ha kano kano ka function ba la call na ki original block.
04:58 Phi lah ban declare ia u local variable kum:

local $fValue = 100 semicolon local $fname = within double quotes "Rakesh" semicolon

05:13 To ngin pyrshang ban sngewthuh ia kane, da kaba pyndonkam da ka sample program.
05:17 Plie ia ka terminal bad type: gedit scope hyphen local dot pl ampersand bad shon Enter.
05:27 Kane kan sa plie ia ka scope hyphen local dot pl file, ha ka gedit.
05:33 Type ia u code harum kumba la pyni ha ka screen. To mynta ngan batai ia u code.
05:40 Hangne, ha ka lain ba nyngkong, ngi lah declare ia u variable $fname bad ngi lah initialized ia u.
05:47 Hapoh jong ka function Welcome(), ngi lah declare ia u local variable da kajuh ka kyrteng, $fname.
05:54 Phin iohi ia u local keyword hashwa jong ka kyrteng u variable.
05:59 Bad ngi lah assign ia u value "Rakesh" ha une u variable.
06:03 Te, kumba ka long, hapoh ka function Welcome(), $fname la pynkylla kum u local variable ba thymmai uba neh shipor. Nangta, la call ia ka function Hello() .
06:15 Hangne kadei ka function definition jong Hello().
06:18 Ha kaba khatduh jong ka program, ngi call ia baroh ar ki functions Welcome() bad Hello().
06:25 Mynta shon Ctrl + S ban save ia ka program.
06:29 To ngin ia execute ia ka program.
06:31 Phai biang sha ka terminal bad type: perl scope hyphen local.pl bad shon Enter.
06:41 Ka output ka pyni kum:

"Hello, Rakesh"! "Hello, Welcome to Spoken tutorials!"

06:48 To ngin ia pyrshang ban sngewthuh ia ka output.
06:51 Ynda la call ia ka function Welcome(), ka function Hello() hapoh jong u, ka access ia ka local variable.
06:59 Hapoh jong u Welcome(), $fname udon ia u value "Rakesh".
07:04 Hadien kane, ka function Hello() ka access sa shisien ia u variable $fname .
07:11 Hynrei ha kane ka khyllipmat, kadei ka variable $fname kaba lah pynsdang ia ka "Welcome to spoken tutorials".
07:19 Kam access ia ka local variable $fname hapoh jong ka function Welcome().
07:25 Kaba mut ba, ka local variable ka pynphai ia ka scope, hadien ba ka lah mih na ka block Welcome().
07:32 Hadien kane, ngin ia peit shaphang ki global variables ha ka Perl.
07:38 Ia ka global variable lah ban access hangno hangno ha ka program.
07:43 Global variables la declare da ka 'our' keyword.
07:47 Hangne katto katne ki nuksa.

our $fvalue = 100 semicolon </nowiki> our $fname =within double quotes Priya semicolon

08:01 Mynta, to ngin ia peit ia ka nuksa jong ka global variables kaba treikam.
08:06 Phai biang sha ka terminal bad type: gedit scope hyphen our dot pl ampersand bad shon Enter.
08:16 Kane kan sa plie ia ka file scope hyphen our.pl ha ka gedit.
08:22 To ngan batai ia ka sample program kaba nga la thoh.
08:27 Nga la declare ia kapackage main bad ka global variable kum our $i bad nga lah initialized ia u sha u100.
08:37 Phi iohi ia ka package First declaration.
08:40 Ka package kadei ka thup jong ki code kiba don la kijong ki namespace.
08:46 Namespace ka iada ia ka variable name collisions hapdeng ki packages.
08:51 Ngin sa iohi kham bun shaphang ki package bad namespace ha ki jinghikai kiba bud.
08:56 Hapoh jong package First, u global variable "i" u buh ia u value 10.
09:02 Ha ka package Second, ia u global variable "i" lah assigned da u value 20.
09:08 Ka main package ka pyndonkam ia baroh ar ki package First variable bad ka package Second variable.
09:15 Ha ka program jong nga, nga lah declare ia ujuh u variable "i" ha baroh ki packages.
09:21 Ia u package variable lah pynithuh da u package name colon colon variable name.
09:29 Ha ka nuksa jong ngi, kadei ka $First colon colon i, $Second colon colon i.
09:39 Ngi don bun tylli ki packages hapoh jong kawei ka file bad ia ka global variable lah ban access da baroh ki packages
09:47 Mynta, save ia ka file bad execute ia ka program.
09:51 Te, phai sha ka terminal bad type: perl scope hyphen our dot pl bad shon Enter.
09:59 Ka output ka lah paw ha ka terminal.
10:03 Peit thuh hi ia ka output ban dup sngewthuh kumno la leh ia ka assignment sha ka variable i .
10:11 Da kane ngi lah poi sha kaba kut jong kane ka jinghikai. To ngin ia batai kyllum.
10:16 Ha kane ka jinghikai, ngi lah pule shaphang ka:

scope jong ki variables declaration jong ki private variables dynamically scoped variables bad global variables ryngkat bad ki nuksa.

10:29 Ka kham biang ban pyndonkam da u 'my' ban ia u local, namar ka stet ka compilation.
10:35 Hangne ka kam na ka bynta jong phi.
10:37 Thoh ia u code na ka bynta ka assignment harum bad execute ia ka.
10:42 Declare ia ka package kum FirstModule.
10:46 Declare ia u variable $age kum our bad assign ia u value 42.
10:52 Declare ia kawei pat ka package kum SecondModule.
10:56 Declare ia u variable $ageword kum our bad assign ia u value hapoh double quotes "Forty-Two".
11:05 Declare ia ka subroutine First().
11:08 Hapoh ka subroutine, declare ar tylli ki variables da ka local bad my keyword kumba pyni harum:
11:16 local $age = 52 semicolon
11:20 my $ageword = within double quotes Fifty-two semicolon
11:27 Call ia kawei pat ka subroutine kum Result().
11:31 Print ia ki values jong $age bad $ageword hapoh kane ka function.
11:37 Pynkut ia ka subroutine.
11:39 Declare ia ka subroutine Result().
11:42 Sa shisien print ia ki values jong $age bad $ageword.
11:47 Pynkut ia ka subroutine.
11:49 Call ia ka function First().
11:51 Print ia ka Package First bad Package Second kumba la pyni harum:
11:57 Ka video ha ka link harum ka kyllum lang ia ka Spoken Tutorial project.

Sngewbha download bad peit ia ka.

12:05 Ka kynhun jong ka Spoken Tutorial project ka pynlong ia ki workshops bad ka ai ia ki certificates sha kito kiba pass ha ka online test.

Na ka bynta ki jingtip ba bniah sngewbha thoh sha ngi.

12:18 Ia ka Spoken Tutorial project la bei tyngka da ka NMEICT, MHRD, Sorkar India.

Kham bun ki jingtip halor kane ka mission kidon ha kane ka link.

12:31 Ma nga U Pdiangburom na Shillong, nga pynkut ia kane. Khublei shibun.

Contributors and Content Editors

Pdiangburom